SpringConstraints sometimes glitch and stay inverted

When a large amount of force is applied to springs, like from falling from a high distance or crashing into something at a moderately high speed, SpringConstraints do this:

image

and they don’t revert themself. How do I stop this from happening?

3 Likes

Well one way is to manually unglitch them by manually positioning the wheels to where they should be.

However, have you added limits to the spring constraints to prevent it from going out of bounds or did it still glitch?

2 Likes

I’ve had this happen to me even with limits. I’m also wondering how to prevent this.

1 Like

The springs have limits on them already, and they still do this.

What is the Spring attached to?
If it’s a PrismaticConstraint, put LimitsEnabled on it.
Yours appears to be just a HingeConstraint somewhere near the center of the car. Put LimitsEnabled on that then.

The spring constraint needs to be used in combination of some other constraints.
Either prismatic, cylindrical, hinges or rods.

You need to limit the motion of these constraints to an allowable area where the spring doesn’t invert.

2 Likes

I’ll try this and get back to you.

1 Like

I’ve attempted to fix this by trying to use Prismatics, but for some reason they just cause the spring to lock up:

Increasing the force of the spring didn’t do anything either. Do you know why this happens/ how to fix it? Cause this seems odd, I’ve used prismatics on springs before like this and they worked fine.

image
The spring is connected to attachments like this, if that helps.

1 Like

Change the Limits of the Prismatic so they are not reversed to the Spring Limits.
If you change them in Test>Play mode see how the movement is affected by your changes, and when you’re happy with it memorize the upper and lower limit, then change them when you’re out of Test>Play.

1 Like

Okay I’ll try this tomorrow. I tried messing with the limits but they didn’t do much but I’ll try reversing them

The blue arrow at the one limit (the green disc on the PrismaticConstraint in the middle of the spring) shows that the Constraint is going to be forced in that direction with the way it’s configured.
The bottom green disc’s limit should be at the bottom of the spring and the top disc should be at the top of the spring since they’re connected to the same Attachments.

So I got the attachments orientated correctly and they somewhat work, but now they cause the car to jitter like this:

Both Prismatics and Cylindricals do this. Do you know why? The UpperLimit is set to the freeLength of the spring and the LowerLimit is default

What are the masses/Densities of the Wheel assemblies and the car chassis?
Sometimes you need a bit of ‘weight’ to these items to dampen them out, too light and they twitch a bit.

Also tweak the SpringConstraint’s MaxForce, Damping and Stiffness settings to make them more realistic.

1 Like

Sorry that I took a while to reply to this.

I doubt its the masses or force of the springs, but here they are:

Springs are relatively normal, 300 damping and 7000 force.

The wheels are .3 density last time I remember and .4-.5 friction

Don’t remember the weight of the chassis but I doubt it’s the weight. Anything heavier than my current weight would push down on the springs too much and have the car lose a lot of the torque

1 Like

Try increasing the wheel Density, I usually start with 2 and decrease it from there. It seems to give better traction when the wheels are more dense rather than less dense, and less dense parts seem to twitch more than denser parts.

1 Like

@rek_kie Did this ever solve the issue? Going through the same with my vehicles

1 Like

Always try experimenting with the Properties of the SpringConstraints.
SpringConstraint | Roblox Creator Documentation, SpringConstraint | Roblox Creator Documentation, SpringConstraint | Roblox Creator Documentation and SpringConstraint | Roblox Creator Documentation all go hand-in-hand to fine tune the performance of the spring.
I usually put all the SpringConstraints in a folder in the vehicle, labelling them Front and Rear in case I need to make the front and rear suspension slightly different. This keeps them all in one spot so they can easily be located and changed without searching through all the Parts in the vehicle.
You may also need to change the Density of the wheels and the body of the car, as well as the Friction of the wheels to further fine tune how it handles.

1 Like