Rotation

Revision as of 19:08, 16 May 2024 by Nikitaivanov (talk | contribs) (Created page with "Similar to Vector, but for rotations instead of a position. The values represent an angle from 0 to 360, though you can use any value and it will loop around, so 361 will be the same as just using a 1. File:Rotation1.png It can be used to set the rotation of a block, angle of the camera, to rotate a vector, among other things. Rotations are applied in Y,X,Z order, this means that a block with a rotation of (45, 10, 25), will first be rotated on Y by 10°, then...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Similar to Vector, but for rotations instead of a position. The values represent an angle from 0 to 360, though you can use any value and it will loop around, so 361 will be the same as just using a 1.

File:Rotation1.png

It can be used to set the rotation of a block, angle of the camera, to rotate a vector, among other things.

Rotations are applied in Y,X,Z order, this means that a block with a rotation of (45, 10, 25), will first be rotated on Y by 10°, then on x by 45°, and finally on Z by 25°. This can sometimes make it hard to get the right angle you want, so keep it in mind.

Internally, rotations are represented as [quaternions](https://en.m.wikipedia.org/wiki/Quaternion).

Related