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

protected setCollisionFlags #1

Closed
YanisBDF opened this issue Mar 23, 2020 · 5 comments
Closed

protected setCollisionFlags #1

YanisBDF opened this issue Mar 23, 2020 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@YanisBDF
Copy link

Hello, I want to add a collision flag to my PhysicsRigidBody but I can't beacause the method setCollisionFlag is protected, same for setActivationState.

@stephengold
Copy link
Owner

There's a PhysicsRigidBody.setContactResponse() method. Do you have some other reason to modify the collision flags?

There's a PhysicsCollisionObject.activate() method and a PhysicsRigidBody.setEnableSleep() method. Do you have some other reason to modify the activation state?

@YanisBDF
Copy link
Author

I want to add an activation state because, when I spawn a stack of cube, they switch to "active tag" to "wants desactivation" and finally to "island sleeping" and when I kill a cube in the bottom of the stack, the others won't fall.

@stephengold
Copy link
Owner

After you kill the bottom cube you should invoke activate() on any bodies that might be affected by the change. That should wake them up (if they're sleeping) and allow them to fall.

@stephengold
Copy link
Owner

@YanisBDF Are the existing methods sufficient for your needs? If they are, I'll close this issue.

@YanisBDF
Copy link
Author

Yes ! Thanks !

@stephengold stephengold added the help wanted Extra attention is needed label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants