Vehicle Instability: Feedback Requested

Hello developers,

I’ll try to keep this simple. Below is a studio file you can download and try for yourself. Feel free to use the vehicle and code in your own project if you like. All I request is that you assist me in fixing the ‘wobbliness’ you see in the video below, as well as the issue where the vehicle tends to veer off to one side. I’m not sure why these things happen and I can’t figure it out. I’d like to smooth those bugs out so the vehicle experience is the best it can be.

I appreciate any and all responses!

In ServerStorage you’ll find one vehicle with the bodykit and one without (functional vehicle skeleton). You only need to rename them to spawn the skeleton instead. The server script is in ServerScriptService and the local script for controls is in StarterGui.
Vehicle_Test.rbxl (99.7 KB)

My main observation: The wobble seems to match the rotation speed of the wheels. That suggests the problem lies in the wheel or ground geometry.

First thing: Run the smooth tool on your terrain and see if the situation improves – your terrain may not actually be as smooth as it looks at first glance.

Second thing to check: Make sure the rotation centre of all the wheels is correct. It kind of looks like one of them might be slightly off centre in it’s rotation

1 Like

Thanks for the reply! I do agree now that you mention it, the wheels do seem to be the problem. I just have no clue what aspect of the wheels needs to be adjusted. Something about the suspension maybe? Is there a way the suspension or wheels can be made more sturdy?

The terrain itself is just a flat baseplate with some mesh dunes. The veering happens even if you’re on a flat part.

Try using invisible spheres or plain Roblox cylinders as wheels and turn the collisions of the visible wheels off.

1 Like

Thanks for the input! The wheels on the car are plain roblox cylinders already, but after trying the sphere tactic, the wobbling and veering seems to continue.

1 Like

It looks like it’s simply a physical problem with your design. That is to say, if you made the same design in the real physical world it would exhibit the same problem. You can see this if you delete BodyKit from the model… it won’t oscillate any more because it doesn’t have as much extra mass to deal with. Real cars have a lot of extra mechanics and tuning, and even software solutions to deal with this stuff.

Adding an Anti-roll bar or something similar may help stop the side-to-side oscillations from building up.

Alternatively you could just set the density of the BodyKit to be really low, at the cost of it not feeling as physically heavy as it should in cornering and what not.

I’m not sure what you mean. They’re all on collision group 0.

@stravant I don’t fully understand how anti-roll bars work, but I’ll do my best at implementing it in this rig. I followed a tutorial for the most part with this rig, so I have next to no Roblox Physics/Constraints knowledge at this point. Do you think adding that would eliminate this problem? I can’t really reduce the weight of the vehicle because I think the weightiness adds a lot to immersion. Perhaps I can try reducing weight but also making the suspension more relaxed so it feels weighty.

I wouldn’t try the anti-roll bar then. It’s not particularly easy to model one of those well if you don’t know your way around the constraint system.

You can also play with the combination of damping / force on the springs. That’s fundamentally the issue: there’s an oscillation building up that the springs are unable to eliminate effectively, due to the particular placement of mass on your vehicle and the settings on those springs.

2 Likes

What typical items in a suspension system is this rig missing, other than an anti-roll bar? Do you know where I might be able to study how to make one?

Are you sure the springs are what needs to be modified?

The first thing I would do to debug is put the chair centered on the chassis, so that there’s no side-to-side weight disbalance. If the shaking is lessened that tells you that the springs / lack of any other damping features are definitely what’s allowing it to shake like that.

It seems to still be occurring at the same force when the chair is centered. I think it may have something to do with the hinges but I’m not really sure.

You can see here that the front hinges just have normal z-fighting when the car is idle because they share their position/angle, but as the vehicle gets going, the hinge seems to oscillate left to right rapidly

That’s a very minor effect. The oscillating of the full car that you get in your original post is lower frequency (one cycle every 10 frames or so I think) and would be much more pronounced than that.

What you’re seeing there is just a flickering due to floating point error.

1 Like

I see. Adjusting the weight of the vehicle and the stiffness of the springs seems to have alleviated the issue, although not entirely removed it. I appreciate the input a lot!

Creating an anti-roll bar sounds interesting to me, so I’ll mess around with that. Any resources other than that link that you think would be useful?

Look up “camber angle” and “caster angle” too if you’re interested. There’s plenty of good Youtube videos out there on all three of those things, explaining exactly how they work and what effect they have on the stability / performance of the car.

1 Like

Don’t know if you’ve fixed this yet, but I had this problem not too long ago and I was able to fix it. At first I tried messing with the damping and stiffness of the springs, and that had little effect. It helped, but it didn’t solve the problem completely.

Ultimately what completely solved it for me was making every part in the car massless except for one base part that is 1 stud tall and covers the length and width of the wheels. Then base your suspension off of this part and weld all the other parts to it. I suppose this fixes it because the springs have the mass more evenly distributed on them.

1 Like