Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework migration of animate_physical_bones for compatibility #93504

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Jun 23, 2024

The main problem with MRP is the lack of bones in Skeleton.

In the first place, PhysicalBone which no bones were assigned, was being activated unintentionally during simulation. This causes performance problems and should be prevented.

Then, when PhysicalBoneSimulator is active, PhysicalBone with bones assigned should be activated in Kinematic mode.

If you have PhysicalBone directly as compat mode (old tree structure), activate the internal PhysicalBoneSimulator by Skeleton3D.set_animate_physical_bones(true). animate_physical_bones seems to have been originally implemented in #36008 for such a purpose. BTW, close #51929 although it is very late.

I added some information about raycasting to the PhysicalBone documentation.

Fixed MRP with adding bone:
TestIntersectRayFixed.zip

@TokageItLab TokageItLab added this to the 4.3 milestone Jun 23, 2024
@TokageItLab TokageItLab requested review from a team June 23, 2024 07:23
@TokageItLab TokageItLab requested review from a team as code owners June 23, 2024 07:23
@TokageItLab TokageItLab force-pushed the fix-physical-bone-raycast branch 2 times, most recently from 19e7d4e to eaf9e60 Compare June 23, 2024 07:54
@akien-mga akien-mga changed the title Rework migration of animate_physical_bones to compatibility Rework migration of animate_physical_bones for compatibility Jun 25, 2024
doc/classes/PhysicalBone3D.xml Outdated Show resolved Hide resolved
doc/classes/Skeleton3D.xml Outdated Show resolved Hide resolved
@TokageItLab TokageItLab force-pushed the fix-physical-bone-raycast branch 2 times, most recently from f56a2a7 to 64229e2 Compare June 25, 2024 09:28
@akien-mga akien-mga merged commit 1f94de2 into godotengine:master Jun 26, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants