Skip to content
Discussion options

You must be logged in to vote

Jolt doesn't use soft constraints to resolve contacts. It uses Baumgarte stabilization with the caveat that the stabilization only affects positions and not velocities. So when a body is pushed out of collision, it stops the moment it leaves collision. You can make contacts 'softer' by reducing PhysicsSettings::mBaumgarte.

If you want soft contacts (as in a spring) then you indeed need to modify Jolt in the way you describe. Note that you also need to remove the code in ContactConstraintManager::sSolvePositionConstraint to disable Baumgarte stabilization.

Can I ask why you want to have soft contacts? What are you trying to achieve?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rodchenkov-sn
Comment options

Answer selected by rodchenkov-sn
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