Skip to content

Collisions with moving children of MutableCompoundShape #673

Answered by jrouwe
DocAce asked this question in Q&A
Discussion options

You must be logged in to vote

There doesn't seem to any way of setting a child shape's velocity, right?

There is indeed no way to set a child shape's velocity. This is very fundamental to how the physics engine works and the only way to get this to work properly is to create separate bodies for child shapes that need their velocity propagated to the simulation.

Another possible way, one that only works if the velocity of the child shape is perpendicular to the contact normal, is to return the velocity through ContactSettings::mRelativeLinearSurfaceVelocity in ContactListener::OnContactAdded / ContactListener::OnContactPersisted.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DocAce
Comment options

Answer selected by DocAce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants