1

I am on a project for the job of creating the real-life truck behavior for simulators and I discovered a problem inside the wheelCollider.rpm. I explain, I discovered that the wheelCollider has a rotation of 0.3885 per minute and this is explained by the way the system works internally due to the interpolation between two images. Since the wheelCollider.rpm is only a get, I can not change the value and I have no idea how to make sure it does not turn when the vehicle is stationary.

  • The wheel's rpm factors in slip between the road and the tire. If you want a slip-free calculation, divide the vehicle's velocity (in units per second) by the wheel's circumference (in units) then divide by 60 to convert to rotations per minute: `float rpm = vehicleVelocity / (Mathf.PI * wheelCollider.radius * wheelCollider.transform.lossyScale.y * 2f * 60f);` – Ruzihm Sep 26 '19 at 16:51
  • It does not solve the problem because if I take the velocity of my vehicle, it is also distorted because as the wheelCollider.rpm turns, this velocity is increased too. – Jonathan Dion Sep 26 '19 at 17:03
  • I don't really understand what the problem is then. The car and the wheels are moving so the rpm should be nonzero. If your question is really "How do I stop the wheels from turning?" I would say set `brakeTorque` to a high number and `motorTorque` to zero. – Ruzihm Sep 26 '19 at 17:08
  • My problem is that when my truck is stopped completely, the rpm still displays -0.388f. – Jonathan Dion Sep 26 '19 at 20:29

0 Answers0