Skip to content

format

typescript
Quaternion.AngleAxis(angle, axis)

class: Quaternion

description

Create a rotation that rotates around an axis by a specified angle.

parameter

param_nametypedescription
anglenumberThe angle of rotation.
axisVector3The axis to rotate around.

return

typedescription
QuaternionThe rotation.

code example

typescript
function QuaternionTest (){
    let quat_axis = Quaternion.AngleAxis(60, new Vector3(0,1,0));
}