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
-2
Question by frogsbo · Jan 21, 2014 at 07:47 PM · rotationfix

No Gimbal Lock Fix or easy rotations for U3d?

Gimbal lock in unity...

There is no fix, no wrapper, no useable spaceship code example file available for unity.

there should be a wrapper for XYZ rotation values, so users can just rotate the objects and some complex matrices adjust the axes so that there is no gimbal lock.

Why isnt a similar code/ example file available for the community so that we can make euler angles without the risk of gimbal locks?

Comment
Add comment · Show 3
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 FLASHDENMARK · Jan 21, 2014 at 07:48 PM 0
Share

Quaternions?

avatar image AlucardJay · Jan 21, 2014 at 07:51 PM 1
Share
  • http://unitygems.com/quaternions-rotations-part-1-c/

  • http://keithmaggio.wordpress.com/2011/07/01/unity-3d-code-snippet-flight-script/

avatar image frogsbo · Jan 23, 2014 at 03:39 PM 0
Share

Quaternions are easy rotations? They are a gimbal lock fix for making spaceship navs? they are waay complex for learning navs.

i did read about 10 questions on here prior to posting concerning gimbal lock, perhaps more, and none of the answers pointed towards there being an easy fix. Alucards solution is amazing though.

I meant, is there now euler angles wrapper that avoids gimbal lock? anyways there may be simple answer in unity-3d-code-snippet-flight-script/ page.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by FrimaMickD · Jan 21, 2014 at 08:08 PM

Like other saids, you have to look at Quaternion. By default, Unity exposes an object rotation in eulerAngles (transform.rotation.eulerAngles) but you can also deal with rotation with quaternions.

Check the documentation on Transform for all pertinent information about object tranformation:

http://docs.unity3d.com/Documentation/ScriptReference/Transform.html

Comment
Add comment · 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
0

Answer by triangle4studios · Jan 03, 2021 at 09:09 PM

I agree with the writer, yes we need to deal with Quaternions to avoid gimbal lock(no one says anything about gimbal reset, another unbearable issue that needs resolution), but they do not offer quantitative documentation regarding how to use it with efficacy.

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 Bunny83 · Jan 03, 2021 at 09:31 PM 0
Share

Sorry but I don't really get what your answer to this 7 years old question is actually about. Quaternions do not have gimbals at all, that's why they don't suffer from gimbal lock. For the same reason euler angles are conceptionally 3 gimbals in a hierarchical structure. So there's no way to "remove" or fix gimbal lock from euler angle by wielding a magic wand. In real world usecases (like a mechanical gyro compass) there are complicated ways to mitigate the issues. That involves a 4th gimbal and a complex sensory system that keeps the system away from the gimbal lock orientation.

3d rotation is not simple and there's no way to somehow make it more simple. Quaternions are already a huge simplification, though not that intuitive as euler angles.

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

23 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

Related Questions

Flip over an object (smooth transition) 3 Answers

Freeze an Axis Rotation Help? 0 Answers

FixBlenderImportRotation wiki scipt x mirror issue 2 Answers

Avoiding Gimbal Lock 1 Answer

I need help with my character's rotation script 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