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

readAimDirection

readAimDirection(character, out): Vector3 | null

The flat unit direction character aims, written into out and returned, or null where it aims at nothing: toward the point a game set with aimAt while it holds, along the character’s own facing while that point stands over it; else, for a character a player or a room’s controller controls, the characters.inputs.aim it holds. On a page, a character the page does not step reads the room’s point, else its facing while its pose says it aims, which trails the aim by its turn. Non-null exactly when isAiming is true. What the steer turns a character to, and what a kit, a game’s own movement or a shot reads.

Parameter Type
character Entity
out Vector3

Vector3 | null