Skip to content

format

typescript
Quaternion.FromEuler(euler)

class: Quaternion

description

Converts Euler angles to a quaternion and returns it.

The rotation is applied in the order of rotating around the z-axis, then the y-axis, and finally the x-axis.

parameter

param_nametypedescription
eulerVector3Euler angles

return

typedescription
QuaternionQuaternion

code example

typescript
function QuaternionTest (){
    let vector = Vector3.new(1,1,1);
    let rotation = Quaternion.FromEuler(vector);
}