- Home /
Question by
ironictrout · May 27, 2018 at 04:37 PM ·
rotationgameobjectrotate
Rotate around a locally tilted axis?,
I am trying to rotate a planet around it's tilted axis. On Start() I am rotating the object 45 degrees on the z axis so that it is leaning backwards. I now want to rotate it around the tilted y axis like how earth rotates around its tilted axis.
I have tried something like:
rotation_speed += Time.deltaTime * 10;
planet.transform.localRotation = Quaternion.Euler(0, rotation_speed, 0) * axis_tilt;
but it doesn't appear to be working. Thanks.,
Comment
Best Answer
Answer by Unified2000 · May 27, 2018 at 04:57 PM
planet.transform.Rotate(0,rotation_speed,0);
Your answer
Follow this Question
Related Questions
Cannot rotate GameObject from C# Animator attached 1 Answer
Rotate a gameobject like car tire 2 Answers
Rotate an Object 1 Answer
Rotate "ghost object" then instantiate object with that rotation 1 Answer
Rotate GameObject Issue 1 Answer