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

turnTowards

turnTowards(rotation, target, maxRadians): Quaternion

Turns rotation toward target 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
target Quaternion
maxRadians number

Quaternion