Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 /
This question was closed Jan 09, 2016 at 10:46 PM by voporak5 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by voporak5 · Jul 08, 2015 at 03:46 PM · rotationtransformmayapivot-point

Object rotation broken

When I try rotating the pages of a simple placeholder book I made in Maya that I brought into Unity, the rotation changes sporadically.

Each page of the book at a local rotation of 0,0,0 are on the right hand side of the book. In Maya I made it so that at 180,0,0 the pages would be on the left hand side of the book.

Pretty simple right? When I manually rotate each page in the scene, the second the X value goes slightly past 90 degrees, the Y and Z values both change from 0 to 180, so now instead of (90,0,0), the pages are (90,180,180) and technically at (0,180,180) the pages will be on the left-hand side of the book. This would be OK if the object didn't start freaking out when I try lerping all of the values through code.

I believe the issue has to do with my Pivot points in Maya but I'm not quite sure. I made sure to Freeze Transformations on all of the pages. Did I miss a step? Thank-you!

Comment
Add comment · Show 5
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 Ilgiz · Jul 08, 2015 at 05:39 PM 0
Share

What about to insert your page into empty object, and then rotate this empty object?

avatar image Torigas · Jul 08, 2015 at 05:44 PM 0
Share

Are you rotating it with the widgets in the editor or with some script? It kinda sounds like a gimbal lock issue.

avatar image voporak5 · Jul 15, 2015 at 04:53 PM 0
Share

I give up, i remade the object and created empty gameobjects for each page to rotate around

avatar image SteveFSP · Jul 15, 2015 at 05:11 PM 0
Share

What method were you using to rotate the object? You can get the behavior you describe if you use euler angles to apply rotation changes. If you use quaternion rotation it gets rid of the issue.

So when rotating, don't do this:

 transform.rotation.eulerAngles = new Vector3(90, 0, 0);

Ins$$anonymous$$d, do this:

 transform.rotation = Quaterion.identity * Quaternion.Euler(90, 0, 0);

There are other quaternion based rotation methods on the Transform and Quaterion objects that may be useful for what you are doing. Basically, stick with quaterions whenever manually animating a rotation.

avatar image voporak5 SteveFSP · Jan 09, 2016 at 10:46 PM 0
Share

I can't remember but I believe I tried that and others. When I remade it everything worked. So it probably was the pivot points.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

24 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 avatar image avatar image avatar image avatar image

Related Questions

Instantiated Game Object is at the wrong location. 1 Answer

How do I rotate the hook? 1 Answer

Use a single rotation axis of a freely rotating object 1 Answer

Dropping an object behind player in respect to rotation,How to drop an object behind the player 1 Answer

transform.position on basis of rotation 0 Answers


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