Hello,
Im trying to make a rotation of a set angle across the pivot of a game object. This pivot is tilted and a bit skew. When I set the angle with the following code it rotates in according to the world Y axis(picture2), how can I make the rotation on the tilted gameobject pivot (picture1)?
steer.transform.rotation = Quaternion.AngleAxis(angle, new Vector3(0 ,1, 0));
Thanks in advance
EDIT: I had some progress with the following code:
Quaternion rotationSteering = new Quaternion ();
rotationSteering.eulerAngles = new Vector3 (0, newAngle, 0);
SteerWheel.transform.rotation = rotationSteering;
This allows me to hardcode the X and Y but this does not results into smooth steering.