Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by flylandcs · Jan 11, 2017 at 09:29 AM · transform.rotationtransform.rotate

Some questions about rotate.

Instructions in advance , my unity version is 5.4.1f1,and I am a Chinese that my English is poor,I hope you can have the patience to read this passage ,thanks. In my project ,I want to rotating a gameobject ,but I found some things that I can't understand: When I change a gameobject's rotation in inspector of the gameobject ,I found if the initial size is (0,0,0), I change any axis ,the gameobject is rotating according to the axis accurately and I can find it in Scene. But if the initial size is (20,0,0),I change Z,gameobject can rotating according to the axis that now gameboject's axis in the Scene, but if I change Y,the rotate's according isn't now gameobject's axis. in the Scene,I observed at the gameobject is rotating according to the (0,0,0)'s axis. Why I change the Z ,gameobject is all rotating according to itself,but I change Y,gameobject is rotating according to the other one coordinate system? It isn't the world coordinate system,I try to implementation in c#,whether I use Space.Self or Space.World,the question is appear. Who can give me some hints?Thanks,I feel sorry for my language proficiency.alt text

110.jpg (292.3 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by 5c4r3cr0w · Jan 11, 2017 at 01:47 PM

It happens because Gimble Lock .. Here when you rotate GameObject to 20 degrees Z axis loses the "Degree of Freedom". So One will rotate Globally and Other will rotate locally. When your X is set to 90 or 270 degrees Y axis and Z axis will do same rotation. You should always rotate with respect to world space though.

Here is another useful and more detailed answer you may find helpful

Comment
Add comment · Show 3 · 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 flylandcs · Jan 12, 2017 at 02:33 AM 0
Share

Thank you very much for the answer. But I didn't find the Gimble Lock or Degree of Freedom,where can I set it in u3d? If it's convenient for you,give me some webpage or demo please.And I hope the gameobject rotate with respect to itself, it‘’s easier to calculate relative to the world space. $$anonymous$$aybe Quaternion.AngleAxis able to solve my problem?

avatar image 5c4r3cr0w flylandcs · Jan 12, 2017 at 05:47 AM 0
Share

Here is Detailed video about it . You might get some idea.

https://www.youtube.com/watch?v=zc8b2Jo7mno

And yes using Quaternion.AngleAxis or Quaternion.RotateAround method would solve this problem.

avatar image flylandcs 5c4r3cr0w · Jan 12, 2017 at 07:17 AM 0
Share

I will carefully watch the video,Thanks a million.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

slowly turn an object 90 degrees by key press 0 Answers

transform rotations overwriting eachother 1 Answer

Rotate gameObject to a specific angle on one axis 0 Answers

Object rotate and slowly stop to toward 1 Answer

Change the Rotation X value without changing Y and Z 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