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

setGravity

setGravity(authority, gravity): void

Sets the pull of the authority’s scene, in metres a second squared: the room streams it to every page, and the next physics step wakes every body, which Rapier leaves asleep on a gravity change alone. A character falls along its y component.

Parameter Type
authority Authority
gravity Vector3Like

void

setGravity(step, new Vector3(0, -1.6, 0)); // the moon