Could someone explain why the car keeps bouncing so much

We are trying to fix the suspension so this does not keep happening but we can’t figure out what the issue is. We do want the suspension to have some bounce but not a lot. Currently this is the set up we have for suspension.

print("function GetMass(model, getAll)
local Mass = 0
if model:IsA(“BasePart”) then
Mass = model:GetMass() * 196.2
else
for _, p in pairs(model:GetChildren()) do
if p:IsA(“BasePart”) then
Mass = Mass + (p:GetMass() * 196.2)
else
if getAll then
local m = GetMass(p, true)
Mass = Mass + m
end
end
end
end
return Mass
end

local MASS = GetMass(DriverSeat, false) + GetMass(Body, true) + GetMass(LFVM, false) + GetMass(LRVM, false) + GetMass(RFVM, false) + GetMass(RRVM, false)

local S1 = MakeConstraint(“SpringConstraint”, “SuspensionSpring”, lFWM, A2_1, A2_5)
S1.FreeLength = (LFWM.Size.Y * Settings.RideHeightMax) + ExtentedBy
S1.Damping = 2 * math.sqrt(Settings.Spring * (MASS / 4) )
S1.Stiffness = Settings.Spring
S1.MaxForce = MASS / 4
local S2 = MakeConstraint(“SpringConstraint”, “SuspensionSpring”, lRWM, A2_2, A2_6)
S2.FreeLength = (LRWM.Size.Y * Settings.RideHeightMax) + ExtentedBy
S2.Damping = 2 * math.sqrt(Settings.Spring * (MASS / 4) )
S2.Stiffness = Settings.Spring
S2.MaxForce = MASS / 4
local S3 = MakeConstraint(“SpringConstraint”, “SuspensionSpring”, rFWM, A2_3, A2_7)
S3.FreeLength = (RFWM.Size.Y * Settings.RideHeightMax) + ExtentedBy
S3.Damping = 2 * math.sqrt(Settings.Spring * (MASS / 4) )
S3.Stiffness = Settings.Spring
S3.MaxForce = MASS / 4
local S4 = MakeConstraint(“SpringConstraint”, “SuspensionSpring”, rRWM, A2_4, A2_8)
S4.FreeLength = (RRWM.Size.Y * Settings.RideHeightMax) + ExtentedBy
S4.Damping = 2 * math.sqrt(Settings.Spring * (MASS / 4) )
S4.Stiffness = Settings.Spring
S4.MaxForce = MASS / 4

Settings.Spring equates to 100K")

This is what happens right now with this current set up
https://i.gyazo.com/8a8668c46401fb278b1298818d832e90.gif

I’d try increasing the damping and if it still bumps decrease stiffness.

2 Likes

Will do.

Kind of off topic, but you can post and format code like this:

1 Like

Just a question about the actual physics of the vehicle.
What are you using for each wheel? Is it a Union, a Cylinder or a Ball?

I had this issue a while back when making go karts with no suspension and Cylinder wheels. They worked great for a while but a change to the physics engine by Roblox made them bounce around.
I changed the wheels to Balls with CylinderMeshes in them and that cleared up the bouncing issue.

If you are using the Union as your wheel what happens if you make it CanCollide off and weld a Ball in its place?

1 Like

We are using a sphere as the actual wheels and the meshes are can collide = false

1 Like

uh i can try

I think he took “Code here” a little bit too serious.

8 Likes

You might wanna check the mass ratios on either end of the springs. If the car body is too light compared to each wheel, it’ll do this. Or if the wheels are too light compared to the car body. It’s tough to tune in just right, but you can do it.

1 Like

Ok I will take a look at this as well.

One of the roblox Engineers figured out 95% of the problem now all we have to do is figure out why the wheels shake when turning.

3 Likes