- Home /
2D rotate 90 degrees issue
Hi there
I have am using an orthographic camera so looking at my scene froma 2d view. I have some sprites that I am rotating 90 degrees on click. The only issue is, which is driving me mental is it's rotating it 90 degrees to the left instead of right. i.e. it's rotating -90 visually.
Any ideas what could be causing this? It's as if my camera is back to front...?
Can't post image from where I am but imagine this...
A compass, North at top... I rotate it 90 degrees and now North is in the West position. Should be in East.
$$anonymous$$y Gizmo is showing Y at top and X to the right (maybe this is the issue)?
Edit: Visually it looks ok, it's just storing what should be a 90 degree angle as 270 degrees..
Are you maybe looking at your object from the bottom ins$$anonymous$$d of top/side?
Answer by Lovrenc · Jan 13, 2013 at 09:41 PM
You set your game in "unatural rotation" of unity system. As you saw in previous question
Z - front
Y - up
X - sideways
Basically, your objects have differently turned coordinate system. In that case, local rotation is not in sync with global rotation anymore (Not that it is necessary! But for your game it seems like it would be much more easier).
Check this up by selecting an object and toggling global/local button at the top of the editor.
So I set it up back to front? DOH! is there a quick way to fix it without starting the project again?
Also Selecting an object and clicking global/local doesn't do anything?
I wont change anything in game, but in editor you should see the sfit of your movement/rotation/scale indicator.
do I need to start again do you think? Looking on from a front view
No you can fix the scene or your code. Whatever you choose.
Either you rotate all your objects, or rotate background and move the object back in line.
Your answer
Follow this Question
Related Questions
Looking at target in 2D 1 Answer
how to rotate 2d obj on android 1 Answer
Animation in Unity editor prevents rotation in script 1 Answer
rotate 2d circle on z axis ? 1 Answer