-
When a dynamic body collides with a hand-animated compound child the resulting impulse doesn't appear to be as correct as it does if the animated object has a physics body of its own. I assume that this is because the simulation doesn't have a velocity for the animated child. There doesn't seem to any way of setting a child shape's velocity, right? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
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
inContactListener::OnContactAdded
/ContactListener::OnContactPersisted
.