Rotation
Rotation
Type | Script block |
Collider | None |
Folder | Values |
Ports | |
---|---|
Outputs | Rotation |
Similar to a vector, but for rotations instead of a position. The values represent an angle in degrees, 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.
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.