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 sun_spider · Feb 09, 2014 at 08:57 AM · 2drotationrotate

Is there a better way to do rotations with new Unity 2D?

I am pretty new to Unity but have worked with a few different game editors. I generally like working in 2D, and the new features are great but rotations seem a little wonky. Or maybe I am doing it wrong... these are the biggest problems I'm having:

1) The rotation vector for sprites in the inspector rotates counterclockwise for positive rotation values... seems weird.

2) Calculating rotations, for example when facing another object, requires using 3D functions and quaternions. This seems overly complicated. Quaternions are one of the main reasons I prefer 2D ;)

Is there a set of 2D functions to handle 2D rotations that I am not seeing?

Comment
Add comment · Show 2
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 Benproductions1 · Feb 09, 2014 at 08:59 AM 0
Share

Quaternions are as good for 2d as they are for 3d. You try to write the horrible interpolation functions you need for 2d euler angles. Also they aren't very hard to work with, once you know how they work it's quite easy to do everything.

avatar image fafase · Feb 09, 2014 at 09:02 AM 0
Share

You cna write your own converter which takes values in 2D and perform the action in 3D. The user only sees 2d though.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Vardan Meliksetyan · Feb 09, 2014 at 03:50 PM

Hi, at first can you say what gameobject you want to rotate, I have good experiance using 2D and 3D in other porject and needs we can do it different ways. After answering my question I can may be help you!

Comment
Add comment · Show 1 · 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 sun_spider · Feb 09, 2014 at 05:36 PM 0
Share

I am writing a bunch of components that I will use in my program$$anonymous$$g class for kids. I don't have a specific problem I need solved... just looking for more intuitive methods before I write them myself (as suggested in the comment from fafase on my question).

It's just so much easier to explain to a kid how to compare two floats (angles of rotation) than how to extract the rotation from a quaternion and then compare and then convert back in order to work with that angle.

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

20 People are following this question.

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

Related Questions

2d game,rotation problem...and need some help to prevent the camera from following my player when it rotates 1 Answer

Why Rotate player toward mouse direction keeps increasing rotation speed? 1 Answer

How to have a gameobject only rotate 180 degrees 3 Answers

Proper way to rotate an object? 1 Answer

how to rotate 2d obj on android 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