Raycaster Vehicle wheel rotations

RedToasty
Posts: 7
Joined: Wed Jan 18, 2012 9:54 am

Raycaster Vehicle wheel rotations

Post by RedToasty »

Just a minor thing, should these be working in 2.79?

The only reason I say this, mine were rotating at crazy speeds, looking at the code, around line 351 it had:

Code: Select all

wheel.m_deltaRotation = (proj2 * step) / wheel.m_wheelsRadius;
Is this as intended? Swapping this to rotation = distance / wheel circumference solved it.

Code: Select all

wheel.m_deltaRotation = (proj2 * step) / (PI * wheel.m_wheelsRadius * 2);
Thanks