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

Rapier incorrectly returns null on state.GetContactColliderObject #102

Open
Scuas opened this issue May 19, 2024 · 0 comments
Open

Rapier incorrectly returns null on state.GetContactColliderObject #102

Scuas opened this issue May 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Scuas
Copy link

Scuas commented May 19, 2024

Describe the bug
state.GetContactColliderObject in _IntegrateForces returns null when it should return a valid node.

To Reproduce
Steps to reproduce the behavior:
Create a c# rigidbody script with the following and run collisions with it (make sure contact monitor is enabled).

 public override void _IntegrateForces(PhysicsDirectBodyState2D state)
    {
        if (state.GetContactCount() > 0)
        {
            GD.Print("object: ",state.GetContactColliderObject(0));
        }
        base._IntegrateForces(state);
    }

If using the example project: Download rapier2D and switch physics engines, hit play. You will notice that the output changes depending on engine used.

Expected behavior
The output should read "object: Rigidbody#" when a contact is detected.

Environment (please complete the following information):

  • OS: [ Windows]
  • Version [[175c45e]]
  • Godot Version [4.3]
  • Type [simd single]

Example project(zip)
rapierexceptionsissue.zip

@Scuas Scuas added the bug Something isn't working label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant