Usually I avoid using SpringConstraints like the plague. Roblox’ physics are just very hard to wrap your head around. I have been trying to create my own custom vehicle system from scratch, but I have come across this issue where the SpringConstraints keep going up, down and sideways irregularly. I have tried to fix them using PrismaticConstraints but to no avail.
The goal is to keep the springconstraints working along the Y-axis, but they shouldn’t be going sideways. For some reason as can be seen at the end of the video a spring just starts glitching out. I want to prevent this as well.
Could anybody explain to me what the issue is, and how I would go about fixing it?
This is the video of what happens
Here are some screenshots of how the wheels are put together:
I test for the highest and lowest working setting. Then split the difference picking the middle working setting.
You may know this…
When I’m putting a body or a frame together, I start with a middle part and base everything else off that. I place it at 0,0,0 so everything added can be mirrored on the other side, accurate to the thousandth place. If the part on the right is 1.945, then the same part on the left would be -1.945. If you’re careful, you can make a perfectly true frame and body. That really helps with the wheels and everything attached to them also.
And…
The frame is really the only part that needs weight or mass. That helps to easily set how it rolls and drifts. The rest of the body can be massless.
I also prefer the car not collide with itself, with a ServerScript.
You can do this from ServerScriptService (this is a test script inside the model itself)…
local phs = game:GetService("PhysicsService")
phs:RegisterCollisionGroup("Car")
phs:CollisionGroupSetCollidable("Car", "Car", false)
for _, part in pairs(script.Parent:GetDescendants()) do
if part:IsA("BasePart") then
part.CollisionGroup = "Car"
end
end
Try the no-collide script… might have slight drag from constant collision.
Just make that a ServerScript and drop it in the car… it’s set up to test that.
Actually sounds like the “power” isn’t being applied or removed evenly.
Maybe your wheels themselves are not true. Should be able to see that testing,
It’s perfect or it’s not kind of thing.
I actually cheat a bit with that; the globes are the real wheels.
So after scouring the deep dark corners of the devforum for some more help on this issue, I have found a fix. It appears the wobbly wheels and the wheels glitching out were two separate issues.
For those wondering how you can fix these issues
The wobbly wheels
I found a devforum post from July 2021 Here that gave me the fix to the wobbly wheels. Basically, instead of making the wheels using a cylinder, make them using a ball. For some reason this significantly imrpoves the smoothness of the wheels when they roll.
The glitching wheel(s)
I removed the SteeringServo’s and replaced them with PrismaticConstraints. This fixed the issue of glitched wheels.