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

When I use CompoundCollisionShape, it causes onContactStarted to be called repeatedly about the collision #39

Open
SolarMoonQAQ opened this issue Feb 11, 2025 · 1 comment

Comments

@SolarMoonQAQ
Copy link

SolarMoonQAQ commented Feb 11, 2025

it happens whenever the collision body undergoes a displacement transformation. And if I use another shape, like BoxCollisionShape, then it would be perfect to only have onContactStarted happen once on collision and not call it repeatedly.

@stephengold
Copy link
Owner

The physics engine uses contacts to simulate collision forces. A single overlap or collision can produce multiple contacts.

If you want to simply detect intersections of shapes, you might do better with a pair test or a sweep test.

For more information about managing collisions, see the tutorial page.

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

No branches or pull requests

2 participants