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

Trigger Collider are active when added to an inactive RigidBody #402

Closed
MonsieurBleu opened this issue Sep 12, 2024 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@MonsieurBleu
Copy link

I am currently making a RigidBody reader/loader from simple text files and I encountered a strange bug, I am working on v0.10.1.

When a rigidbody is created, and put in an inactive state, every trigger collider added to that body will be active. They actually trigger my event listener and each time the body is set to active the program crash with an assertion fail :

Assertion failed: collider->getBroadPhaseId() == -1, file [...]\reactphysics3d-0.10.1\src\systems\BroadPhaseSystem.cpp, line 82

Likely because the program tries to add a collider to the body, but the collider is already active and has a broadphaseID.
The last important thing important to note is that all the loading part is done before any physicworld update.

My problem was solved by loading the 'isActive' element in the very end, after adding all the colliders. But the larger problem still persists on rp3d.

@DanielChappuis
Copy link
Owner

Thanks for reporting this. I will look into that.

@DanielChappuis DanielChappuis self-assigned this Sep 13, 2024
@DanielChappuis DanielChappuis added this to the v0.10.2 milestone Sep 13, 2024
@DanielChappuis
Copy link
Owner

I have fixed the issue in this commit in the develop branch. This will be available in the next release of the library.

Thanks again for reporting this.

@DanielChappuis
Copy link
Owner

This should have been fixed in the last released version of the library.

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

No branches or pull requests

2 participants