# Wheels Move Incorrectly At High RPMs

I wait for a few seconds at the beginning of the game before spinning all of the wheels with servos to avoid any lag spikes that could affect physics accuracy.

Here are my results:

Increasing angular speed increases error but the error curve seems to flatline at higher speeds.
Here is the test file: WheelSpinBug.rbxl (23.6 KB)

I expected the wheels to not slip because I have the friction of all the parts set to 1 and elasticity set to 0. It is my understanding that a wheel will travel its circumference once per revolution.

If a fix is not available, how are developers expected to compensate for this error when developing vehicles?

Assuming youâ€™re using CustomPhysicalProperties (the Friction and Elasticity properties now do nothing):

First of all, the max Friction is 2, not 1.

Second of all, the friction of the other part also influences this. Try setting FrictionWeight to 100 on the wheel.

If that still does not solve it, make the wheel heavier (denser). My wheels tend to have a density of 5 or more.

Increasing the friction of all the parts in the place to 2 certainly did reduce the error, but it was still about half the correct distance it should have traveled keeping all other things the same.

Increasing the density of the wheels does reduce the error, but sadly that is not an option for me and many other developers because that will mess with a vehicleâ€™s braking and steering properties.

Are you sure your wheel is staying in contact with the ground at all times for this test?

And have you measured its rotational speed (`wheel.RotVelocity:Dot(wheel.CFrame.RightVector)`, maybe negate the RightVector idk) manually as well?

Iâ€™m only looking at it visually to determine if the wheels are staying in contact with the ground. For this test it looks like theyâ€™re all staying on the ground.

I do not measure rotational speed, I am not sure how that would help here. The angular speed is defined in radians per second as documented here.

If you measure the rotational speed, you can see if the wheel is actually rotating at 20 radians per second or not. If it isnâ€™t, that could explain your results.

How are you rotating the wheel? Constraints or etc.?

Friction depends on the friction coefficient values on the two materials in contact, and the force pushing them together (in your case, gravity). So the mass of the car is always going to play a part in this. If you make the car lighter, the wheels will slip more, and if you make the car heavier, the wheels will slip less. (You donâ€™t necessarily need change the wheelsâ€™ heavier, you can just change the body)

2 Likes

This is actually partially false in my experience. Iâ€™ve found that making the wheels heavier as well can actually make the car suspension work better, as opposed to making only the body heavy.

I know itâ€™s not realistic, but it worksâ€¦

Youâ€™re right there is more to it. Making the wheels heavier will make them harder to turn. So the MaxTorque on the HingeConstraints may to be higher to reach a target velocity. So making the wheels heavier (or lowering MaxTorque) can also help with respect to the fact that the wheels may take longer to reach their target velocity, and slip less.
But the total mass of the car is what is going to alter the amount of downward force gravity is applying on the car, which directly effects friction.

Especially with a more complex suspension system, both the wheel and body mass are going to be important to tune. This example was just 4 wheels hinged to a base.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.