Shape.transformRotation

Transform a world rotation to the local shape transform.

Kind: Function

Environments: Game

Game

shape:transformRotation( quat )

Open the full Game reference

local worldUp = sm.vec3.new( 0, 0, 1 )
local worldRot = sm.vec3.getRotation( worldUp, worldDir )
local localRot = self.shape:transformRotation( worldRot )

Parameters:

Name Type Description
shape Shape The shape.
quat Quat The untransformed quaternion.

Returns:

Type Description
Quat The transformed quaternion.