Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

turnTowards

turnTowards(rotation, to, maxRadians): Quaternion

Turns rotation toward to by at most maxRadians, the short way round, in place, and returns it: three’s rotateTowards and Unity’s Quaternion.RotateTowards, on the engine’s exact trig, so a room and every page turn a body to the same bytes.

Parameter Type
rotation Quaternion
to ReadonlyQuaternion
maxRadians number

Quaternion