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

RigidBody3D frozen as kinematic doesn't always report contacts with Jolt Physics #100700

Open
mihe opened this issue Dec 21, 2024 · 0 comments · May be fixed by #100701
Open

RigidBody3D frozen as kinematic doesn't always report contacts with Jolt Physics #100700

mihe opened this issue Dec 21, 2024 · 0 comments · May be fixed by #100701

Comments

@mihe
Copy link
Contributor

mihe commented Dec 21, 2024

Tested versions

Reproducible in: 4.4.dev [a7a2a12]

System information

Windows 11 (10.0.26100)

Issue description

This is an issue introduced by #100533.

In short, a RigidBody3D frozen with FREEZE_MODE_KINEMATIC and contact_monitor enabled (along with a non-zero max_contacts_reported) is currently only able to report contacts when moving.

This differs from Godot Physics, where contacts are reported regardless if such a body is stationary or moving.

The reason for this is that #100533 made it so contacts are only reported for active/awake bodies. The problem with this is that kinematic bodies are only considered to be active/awake for the physics step after having moved, which meant that you'd have to be moving the kinematic body in order for contacts to be reported for it.

Steps to reproduce

  • Open the MRP.
  • Run the main scene.
  • Note how no contact is reported in the Output window until the capsule starts moving.
  • Switch physics engine to GodotPhysics3D.
  • Note how contacts are reported right as the box falls on top of the capsule.

Minimal reproduction project (MRP)

jolt-kinematic-contacts.zip

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

Successfully merging a pull request may close this issue.

1 participant