Prevent raycast car from rolling down ramps

I have a raycast suspension car that currently has no uphill traction whatsoever, this is because instead of having the spring forces point straight up they point towards the car’s UpVector. I need a way, preferably a calculated force to keep the car from rolling down ramps/slopes. I have found one way to achieve this, however it’s not 100% functional as it makes the car roll down just a tiny bit. (not using it in the video)


Any help is appreciated.

I think if you change the friction of the car and the hill it will allow your car to go further uphill. This is assuming the car uses the roblox physics and loses velocity as it goes up the hill.

1 Like

It’s a raycast suspension car, it has no contact with the ground

1 Like

Can you get the normal of the raycast and act on the car accordingly?

1 Like

That’s what I have done previously, however the force I’m applying is not 100% effective, so I’m looking for another way to calculate it

1 Like

So transform the force from the upvector of the car to the world up?

To direction of gravity.

1 Like

I can’t do that as the car has to be able to ride on walls/sideways

1 Like