- Home /
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?
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.
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
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.
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
Follow this Question
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