I’m going to attach a place file to this post because I’m at a point where I have no idea what to do. I’ve made a physicsless system that properly simulates vehicle movement and how it’s affected by the shock absorbers.
I’ve gotten it pretty accurate and it’s near a point that I’m very pleased with except for one major issue. Whenever the vehicle is tilted horizontally too far, it starts floating away and flipping around wildly. You can view this yourself by using Play Solo and turning the car while halfway up the wedge…
I think the issue is related to the “getsuspensionangle()” function. But in total the script is only 173 lines, so take your time and see if there’s anything you can do to help me here.
Vehicle.rbxl (52.6 KB)
Additional information: At line 12 you’ll notice a line that sets the inertial delay of each vehicle part to 0.25, increasing this will make the vehicle’s physics more “springy” and decreasing it will make everything more rigid. The transparent yellow block represents the vehicles center of mass, while the non-transparent yellow block helps visualize the vehicle’s center of gravity. The vehicle’s code runs pretty much every 0.004 seconds (4 times per frame) because when it was only running once per frame, it wouldn’t interact properly with other objects while at high speeds.