Breakable constraints #141
-
On Constraint::SetEnabled() the documentation says: How do I query the impulse on a constraint? So far I haven't found anything where such information is accessible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You would use e.g. HingeConstraint::GetTotalLambdaPosition/GetTotalLambdaRotation. You can see this value as the linear/angular impulse applied at the constraint in the last physics step to keep the constraint together. At the end of each physics step you would look over all your breakable constraints and see if this value exceeds a predefined threshold. If it does you would do Constraint::SetEnabled(false) or remove the constraint. |
Beta Was this translation helpful? Give feedback.
You would use e.g. HingeConstraint::GetTotalLambdaPosition/GetTotalLambdaRotation. You can see this value as the linear/angular impulse applied at the constraint in the last physics step to keep the constraint together. At the end of each physics step you would look over all your breakable constraints and see if this value exceeds a predefined threshold. If it does you would do Constraint::SetEnabled(false) or remove the constraint.