How does object.rotation work?
See original GitHub issueHi,
I’m trying understand how work rotations property on objects. I need to do a lot of rotations, but when i do the first rotations i dont understand the behavior of the next rotations.
this.de2ra = function(degree) { return degree*(Math.PI/180); }
This work ok alone:
this.cube.rotation.y = this.de2ra(90);
and this too:
this.cube.rotation.x = this.de2ra(45);
but if i do this:
this.cube.rotation.y = this.de2ra(90);
this.cube.rotation.x = this.de2ra(45);
if the exactly the same of this:
this.cube.rotation.y = this.de2ra(90);
this.cube.rotation.z = this.de2ra(45);
Anyone can explain me why work like that? Ty all, and sorry for my english.
Issue Analytics
- State:
- Created 11 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Chapter 1 Rotation of an Object About a Fixed Axis
Figure 1.1: A point on the rotating object is located a distance r from the axis; as the object rotates through an angle...
Read more >When and why do objects rotate? - Quora
Gyros are wheels. A rotating object has angular momentum. If the wheel increases or decreases its angular momentum in one direction, to conserve...
Read more >rotation | National Geographic Society
Rotation describes the circular motion of an object around its center. There are different ways things can rotate.
Read more >How to Rotate in Unity (complete beginner's guide)
Rotation in Unity typically works by specifying an amount of rotation in degrees around the X, Y or Z axis of an object....
Read more >5.4: Dynamics of Rotating Objects - Physics LibreTexts
We will work both problems in parallel, to make the difference more evident. Start with mechanical energy conservation from the top of the...
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 Free
Top 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

Rotations occur in the order specified by
object.eulerOrder, not in the order you specify them.The default Euler order is ‘XYZ’, so rotations are by default performed in the order X-first, then Y, then Z.
Rotations are performed with respect to the oject’s internal coordinate system – not the world coordinate system. So, for example, after the X-rotation occurs, the object’s Y- and Z- axes will generally no longer be aligned with the world axes.
So if I want to rotate with regards to world coordinate, must I do some really hard math regarding to Quaternion and stuff, or is there some command to just rotate on world coordinate, cause that is some pain in the neck.