Skip to content

_integrate_forces() reports contact_count=0 during RigidBody2D collisions #376

@mjx1905-001

Description

@mjx1905-001

I am using Godot 4.4.1 with godot-rapier-physics 0.8.12.
The same codebase is used, with the only difference being the physics engine.
When using Godot's default physics engine:
After a collision occurs between RigidBody2D and StaticBody2D,
the rigid body breaks into two pieces at the collision point (as implemented in my code).
When using the Rapier physics engine:
After a collision occurs between RigidBody2D and StaticBody2D,
the rigid body simply stops moving and does not break into two pieces.
The reason for this difference:
With Godot's default physics engine during collision,
the state.get_contact_count() in the _integrate_forces function within RopePiece_mjx_lib code returns a non-zero value.
With the Rapier physics engine during collision,
the state.get_contact_count() in the same _integrate_forces function returns 0.
​Implementation Steps:
Simply run the project using two different physics engines to observe this behavior difference.

test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions