self:set_quaternion

Client

Sets the local rotation of the animatable body using a quaternion


Syntax

local status = self:set_quaternion(
    quaternion
)

Parameters

TypeNameDescription
vector4quaternionRotation to apply as {x, y, z, w}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the quaternion of a animatable body
local entity = physics.animatable.create()

entity:set_quaternion({0, 0, 0, 1})

On this page