format
typescript
Quaternion.Slerp(q1, q2, t)class: Quaternion
description
Performs spherical interpolation between two quaternions.
parameter
| param_name | type | description |
|---|---|---|
| q1 | Quaternion | The starting quaternion. |
| q2 | Quaternion | The target quaternion. |
| t | number | The interpolation factor. |
return
| type | description |
|---|---|
Quaternion | A new quaternion. |
code example
typescript
function QuaternionTest (){
let identity = Quaternion.identity;
let quat_axis = Quaternion.AngleAxis(60, new Vector3(0,1,0));
let quat_slerp = Quaternion.Slerp(identity,quat_axis,0.5);
}