You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > rotate

19.2.20 rotate

rvec = physics.Vect:rotate(vec)

Parameter

Type

Description

self

in physics.Vect

The input vector

vec

in physics.Vect

The other vector

rvec

out physics.Vect

The resulting rotated vector

Uses complex multiplication to rotate self by vec. Scaling will occur if self is not a unit vector.

Introduced in platform.apiLevel = '2.0'