How to make a car with suspension system climb high heels?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear.

Created a car with suspension system. Want it to climb high heels with a slow speed.

  1. What is the issue? Include screenshots / videos if possible!

it needs high speed. Basically I want to have high friction wheels

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I used this tutorial

There was something about friction and by increasing it the car just flips and flies around.

There is another video of Roox4 as well

where they could achieve what I want.

Will appreciate any tips and advices!

1 Like

show code where you’re trying to add friction to the wheels

it is basically copied from the first video I linked.

if raycast then

			local raycastDistance = (rayOrigin - raycast.Position).Magnitude
			
			local springLength = math.clamp(raycastDistance - floatingHeight, 0, SuspensionMaxHeight)
			local stifnessForce = Stiffness * (SuspensionMaxHeight - springLength)
			local DampingForce = Damping * ((LastSuspensionLength[wheel] - springLength) / deltaTime)			
			local SuspensionForce = car.CFrame.UpVector * (stifnessForce + DampingForce)
			
			local RotationsOnlyWheelDirCFrame = CFrame.lookAt(Vector3.zero,carCFrame.LookVector,carCFrame.UpVector)
			local LocalVelocity = RotationsOnlyWheelDirCFrame:ToObjectSpace(CFrame.new(car:GetVelocityAtPosition(raycast.Position)))

			local Xforce = carCFrame.RightVector * -LocalVelocity.x * friction
			local Zforce = carCFrame.LookVector * LocalVelocity.z * (friction / 3)

			local forwardForce = carCFrame.LookVector * 60
			LastSuspensionLength[wheel] = springLength
			
			car:ApplyImpulseAtPosition(SuspensionForce + Xforce + Zforce + forwardForce, raycast.Position)
			
		else
			LastSuspensionLength[wheel] = SuspensionMaxHeight
		end

(forwardForce is just the force that makes the car go forward for testing purposes only.)

That’s the part if raycast is not nil and I have no idea how friction here is supposed work.
And I don’t know how to apply the physics formula for friction on floating object.