- Home /
Question by
RenStrike · Dec 23, 2015 at 04:27 PM ·
rotationrotation detectiongimbal-lock
Rotate one gameobject in 90 degree increments based on another gameobjects rotation.
What I'm trying to do is rotate Gameobject 1's Y axis based on the Y axis range of Gameobject 2.
So, for instance, if Gameobject 1 is angled anywhere between NorthWest and NorthEast, then Gameobject 2 should be facing exactly North, then if Gameobject 1 changes it's angle to anywhere between NorthEast and SouthEast, then Gameobject 2 should change it's angle to be exactly East.
I tried to do it based on the y angle of the objects but I think i was running into some kind of gimbal lock issue.
Comment