How can I simulate a planet's rotation on the Z axis but tilted x° ( similar to how the Earth's rotation axis is tilted 23° relative to its orbit).
I know with Euler angles I'll meet some gimbal lock issues, so I'm looking for a quaternion solution.
Ended up doing something like that in my update :
SpinAngle += deltaTime * Speed; Quaternion rotationAboutAxis = Quaternion.Euler(0, SpinAngle, 0); Quaternion tiltOfAxis = Quaternion.Euler(0, 0, TiltAngle); transform.rotation = tiltOfAxis * rotationAboutAxis ;
Where TiltAngle is in degree :) Thanks !