Proper suspension movement

The current WheelCollider has wheels only go up and down on a vertical axis, like the spring-damper is connected right on top of the wheel. But in reality, it should move on an arc, and affect the camber, based on the type of suspension (leafspring, double wishbone, strout).
Is there a way I can use Quaternion and Vector3 maths to calculate the rotation and position of the visual wheel mesh, based on suspension compression, and rotation, position from WheelCollider.GetWheelPose()? I don’t want to use Transform methods such as RotateAround() or LookAt().
Picture taken from Unreal Engine documentation on vehicle. They are not the most accurate, but can get the idea across

Looks like linear and angular spring and dampening. You can either use unity’s configurable joint. Or you can code your own by looking up hook’s law.

Yes I know that and I have that already. My question is how do I calculate the position and rotation of the wheel along an arc without using Transform.RotateAround().

This is linear algebra translating then rotating through matrix would be ok. So you can apply your translation to get your point.
Or you can use Quaternion.

So basically RotA * RotB means that you are trying to rotate something relative to RotA. So RotA is your circular motion and rotB is your wheel. If you want to rotate wheel’s position, it’s just quaternion times point times quaternion inverse.

1 Like

Thanks a lot. Quaternion multiplication is just what I need. Totally forgot about that. :smile: