Wheel Collider Random slip spikes over 5ms (Video) Unity 2017.1

Exceeding 5ms Magnitude causes strange random Wheel Collider friction spikes.

Unity 2017.1 Default values.

I was adding wheel slip FX, tyre smoke, skid marks, sound and came across this odd issue which I think is a bug since it starts occurring exactly when the Rigidbody is at 5ms+ which seems like some hard coded internal value.

Nothing I tried would fix it, I believe this is an engine bug.

In the following video pay attention to the ‘Mag’ value when it is above and below 5ms and how the wheel behaves. I added the white bar to the wheel to contrast the wheel pose behaviour so its more visible.

In the top left are wheel slip limit values, they highlight erratic nature of the forward friction.

I tested this in 5.6.1p4 and initially the issue went away, but after saving the scene and working for a few moments it started happening again.

Does Unity use the NVidia GPU at at all to process the physics, could it be a driver issue?

I have sold this problem.

Its the Vehicles Rigidbody interpolation, it needs to be set at runtime.

We had a similar problem with Ragdolls in another project which we discovered. The ragdolls would have very odd dislocation of joints and the fix was to set the Rigidbody interpolation on in Start() rather than being set in the inspector.

Another follow up, seems to actually be more related to the Wheel mass, I increased the Wheel mass from the default 20 upto 35 and the issue stopped.

The wheels on my Jeep have a radius of 0.6 up from the default of 0.5, I wonder if increasing the radius should imply a heavier wheel which is being factored into the sprung mass calculation?

Looking at the PhysX docs the Wheel Damping Rate is not listed but when configuring the wheel in code there is a value for MOI Moment Of Inertia.

http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Vehicles.html

Unity doesn’t use the GPU to process the physics. It’s always done at the CPU.

Cheers Edy, I had a hunch that was the case but you never know.

Have you by chance notice this issue at all, you’ve done a lot of vehicle stuff right?

Does seem to be something you need to ‘tune around’ to avoid.

I’ve been developing a light weight system for a new mobile game I’m working on.

https://www.youtube.com/watch?v=RYNjF1Oujnc

I’ve re-read your post and yes, that issue may surely be resolved with the vehicle substeps:

If I recall correctly, the default parameters are 5, 3, 1. This is why the behavior changes above 5 m/s. Setting the substeps to 5, 3, 3 (assuming 3 is the default substep value, I’m not entirely sure) would give you the same behavior at all speeds.

1 Like