Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by curv · Jan 13, 2013 at 09:15 PM · 2drotation2d rotation

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...?

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lovrenc · Jan 13, 2013 at 09:18 PM 0
Share

Can you post a picture or something?

avatar image curv · Jan 13, 2013 at 09:25 PM 0
Share

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..

avatar image Lovrenc · Jan 13, 2013 at 09:27 PM 0
Share

I know what you're saying. I wanted to see your setup.

avatar image curv · Jan 13, 2013 at 09:29 PM 0
Share

ok Lemme see if I can post an image.. 1 sec

avatar image Lovrenc · Jan 13, 2013 at 09:29 PM 0
Share

Are you maybe looking at your object from the bottom ins$$anonymous$$d of top/side?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

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.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image curv · Jan 13, 2013 at 09:45 PM 0
Share

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?

avatar image Lovrenc · Jan 13, 2013 at 09:47 PM 0
Share

I wont change anything in game, but in editor you should see the sfit of your movement/rotation/scale indicator.

avatar image curv · Jan 13, 2013 at 09:53 PM 0
Share

do I need to start again do you think? Looking on from a front view

avatar image Lovrenc · Jan 13, 2013 at 09:57 PM 0
Share

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.

avatar image curv · Jan 13, 2013 at 10:07 PM 0
Share

ok thanks.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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

(2D) rotate object to face movement direction 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges