Skip to content

Breakable constraints #141

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

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jankrassnigg
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