format
typescript
Quaternion.Set(index, value)class: Quaternion
description
Set the component of the quaternion based on the index.
parameter
| param_name | type | description |
|---|---|---|
| index | number | 0 for x component, 1 for y component, 2 for z component, 3 for w component. |
| value | number | the value of the corresponding component. |
reture
| type | description |
|---|---|
void |
code example
typescript
function QuaternionTest (){
let identity = Quaternion.identity;
for(let i = 0; i < 4; i++)
{
identity.Set(i, i);
Debug.Log(identity.Get(i));
}
}