Shape.transformRotation
Transform a world rotation to the local shape transform.
Kind: Function
Environments: Game
Game
shape:transformRotation( quat )
local worldUp = sm.vec3.new( 0, 0, 1 )
local worldRot = sm.vec3.getRotation( worldUp, worldDir )
local localRot = self.shape:transformRotation( worldRot )
Parameters:
Returns:
| Type | Description |
|---|---|
| Quat | The transformed quaternion. |