Car Suspension Scripting Problem

Continuing the discussion from Car Suspension (Scripted):
Ok , So I’ve been trying to make car suspension by equation shown by Oseday one of posts, but I have trouble making it. Here is current state of the car Scripted_Suspension.rbxm (12.8 KB)
Note:you should place suspension script in starterPlayerScripts.

Main issue is that it never calculates accurate force thus, making car drive like a dead stone.

Here is reasons it may not be working(I have no Idea why though):

1.Maybe rayCasting is not done properly. This might include, that I’m calculating ray start pos, from wrong part, or I’m targeting wrong position. Maybe I should be calculating distance between Wheels and edge parts and applying force accordingly, but prismatic constraint should already be doing that.

2.I know that Wheels should be canCollide off, but they fall underground, since there is not enough force.

3.Prismatic Constraints might not be done correctly, but I don’t know exactly what is wrong.

If I multiply force by big number, car goes flying around.
My car is not stable and is not made properly. I need your help, to simulate Car suspension

6 Likes

I have created an open source system for custom vehicle physics solvers, you can look more into how suspension is handled through the function ‘bk’ in game.ReplicatedStorage.Module.Chassis (Line 526)

2 Likes

There was a huge debacle in which this place was shared on another thread. The chassis in question does not belong to the poster and was since taken down. This person is also not a member of the DevForum, so they won’t be able to adequately address your post.

There are many other resources and open sourced chassis available that you can find and work from. Vehicle development is a pretty popular topic around here so it wouldn’t be difficult to find something you like and are comfortable working with.

2 Likes

Wait, the chassis that Vernando posted does not belong to him?

1 Like

It does not. A thread some time ago (that had all its posts moved and the thread locked) discovered that the chassis was from Jailbreak, to which badcc confirmed after viewing it.

1 Like

Ah, what a shame.
Paid him $15 for his help & contribution :joy:
Oh well, I did notice they were similar but I thought it was just in icons.
Thank you for the post, I’m going to message him now

2 Likes

No wonder why @xXVernandoXx chassis place was in private. That’s why it was closed then.