misleading javadoc for Quaternion fromAngles()
See original GitHub issueCurrently the javadoc for Quaternion fromAngles() says:
Note that we are applying in order: (y, x, z) aka (yaw, pitch, roll)
but we've ordered them in x, y, and z for convenience.
- I believe that the angles are actually applied in the order (x, z, y) not (y, x, z). One could write a short console app to test this.
- There are actually six possible assignments of yaw/pitch/roll axes to x/y/z, so the information about yaw/pitch/roll is unhelpful.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Javadoc Euler descriptions wrong - jMonkeyEngine Hub
I'm fairly certain that the Quaternion class Javadocs are wrong wherever they ... When using these methods, the float[3] constructor and to/fromAngles() ......
Read more >engine/src/core/com/jme3/math/Quaternion.java - Google Git
<code>fromAngles</code> builds a quaternion from the Euler rotation. * angles (y,r,p). ... Get the angle between the 2 quaternions, and then store the...
Read more >Quaternion * operator docs misleading for edge cases
I am not just being pedantic here, the quaternions being {0,0,0,0} is a common error - uninitialized quaternions look fine in the editor...
Read more >How to Write Doc Comments for the Javadoc Tool - Oracle
If you add any documentation comment or tag to m() , the "Overrides" or "Specified by" subheading and link will still appear, but...
Read more >How to properly rotate a quaternion along all axis?
To illustrate the resulting camera rotation when the mouse moves, I show you a hand drawing. On the left side the wrong rotation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I wrote a test this morning while drinking my coffee. From zero, each axis does work correctly, but once changing multiple angles, it quickly becomes apparent that the order the rotation angles are applied is wrong.
I think because it IS a breaking change, that another option would be to create methods like fromAnglesYXZ(), etc. and deprecate this one.
…otherwise, I generally agree that it’s wrong. It’s written for an x=forward coordinate system where JME uses a z=forward coordinate system.