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_name | type | description |
|---|---|---|
| euler | Vector3 | Euler angles |
return
| type | description |
|---|---|
Quaternion | Quaternion |
code example
typescript
function QuaternionTest (){
let vector = Vector3.new(1,1,1);
let rotation = Quaternion.FromEuler(vector);
}