Skip to content

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

Closed
@mihe

Description

@mihe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions