How to apply longitudal and lateral forces on a wheel? (raycast suspension)

What do you want to achieve?
I have created a vehicle that uses raycasting as a core component of the suspension. This works, however, without having actual on-ground collisions the vehicle cannot move. Now I’m left to use VectorForces to simulate the forward and sideways forces acting on a vehicle wheel.

What is the issue?
I have no idea how to implement resistance forces.
There’s an attachment and a corresponding VectorForce on each corner of the physics body.

The blue arrows represent the suspension and the red arrows represent the forward force. The front two attachments rotate accordingly to the steering (ackermann) and this changes their lookVector so the vehicle can turn.

local SpringForce = Spring.CFrame.upVector.Unit * Force
local Force = Car:GetAttribute("Power") * throttle * CornerAttachment.CFrame.lookVector.Unit
Physics[Spring.Name].Force = SpringForce + Force

This works, the car accelerates and turns (although terribly) and “transfers weight” when accelerating/braking/steering, however as you can see it spins out of control because there is no drag, friction force or a sideways force.

https://gyazo.com/2d649c37aadf815286a2162c3db6989e
https://gyazo.com/6a01e1c9c886621323ad2b6e5b3c6757

What solutions have you tried so far?
I have tried to apply a lateral/sideways force but it behaved even worse. Going through devforum I only saw solutions related to objects that use a single force at the center of mass to reach a terminal velocity. I could not find any resources related to my case - where forces act differently on each tire like in the image.

image

Open to try any tips and ideas since this doesn’t appear to be well documented on the forum.

Getting an answer to this would indeed be very helpful :pensive:

1 Like

Still suffering here, don’t think there is a combination I didn’t try at this point.

Yep. Probably just going to do a physics based chassis instead. If you don’t mind, let me know if you are able to find anything. I’ll let you know if I do as well.