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

How can i remove a Rigid Dynamic actor from scene when it collide with a specific object ? #214

Open
JitendraDogra opened this issue Sep 22, 2023 · 2 comments

Comments

@JitendraDogra
Copy link

Currently i am trying to remove an object from scene when it collide with a specific object does anybody know proper way to achieve this scenario.

@rlidwka
Copy link
Contributor

rlidwka commented Oct 4, 2023

First you detect the collision using onCollision hook (don't forget scene filters). Then you get actor pointer from collision callback, verify that it's valid (flags), and remove it (scene.removeActor is a thing, but you can just drop the actor, and it'll remove itself the scene on cleanup).

This is pretty long list of things to do, is there any particular part you have trouble with?

@JitendraDogra
Copy link
Author

Actually i tried to remove actor on collision but got some error right now i am away from my work machine i will post source and error. Thanks @rlidwka.

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