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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
Authority |
gravity |
Vector3Like |
Returns
Section titled “Returns”void
Example
Section titled “Example”setGravity(step, new Vector3(0, -1.6, 0)); // the moon