format
typescript
Quaternion.LookRotation(forward, up)class: Quaternion
description
Create a quaternion with the specified forward and up directions.
parameter
| param_name | type | description |
|---|---|---|
| forward | Vector3 | The forward direction. |
| up | Vector3? | The up direction. |
return
| type | description |
|---|---|
Quaternion | A new quaternion. |
code example
typescript
function QuaternionTest (){
let quat_forward = Quaternion.LookRotation(new Vector3(1,0,0));
let quat_forward_up = Quaternion.LookRotation(new Vector3(1,0,0),new Vector3(0,1,0));
}