Prismatic constraint + spring get stuck after high force impact

I use a PrismaticConstraint + SpringConstraint for a suspension block in my game. When the spring gets compressed with a lot of force either the PrismaticConstraint or SpringConstraint will get stuck below the MinLength value, breaking the suspension block

Notice CurrentPosition on the prismatic constraint

image

image

2 Likes

Make sure the spring constraint is far from being able to invert. Set the limits on the prismatic such that the spring can’t be shorter than 0.2 to prevent inversion. This is because we have some tolerances and margins in the physics engine.

5 Likes

Also it’s possible that the two flat purple parts are tunneling through each other and collisions are keeping the spring inverted. In any case you will need to add some larger tolerances into this mechanism.

Just don’t allow the spring to become too short.

3 Likes

Also, what is the Density of the Parts you have in your vehicle?
The MaxForce of 10000000 and Stiffness of 400000 seem pretty high for any suspension vehicle I’ve used, and my vehicles seem much larger than yours is. I try to keep my vehicles light for just this reason and many times use the Massless checkbox on most Parts except for the main components.

Springs getting stuck in the negative position is still an issue in my game. It doesn’t look like they’re being compressed a lot when they invert

It happens in this game. click machine selection on top right then use this code to download it

3a1db1d9-f562-45fd-b0a7-0396afbc2b51

You will need to use cone limits (or other limiters) to prevent the axis from inverting and placing the system in an invalid configuration. The springs unfortunately don’t have the notion of orientation.

1 Like