We’re introducing Meta accounts in August 2022: a new way to log into VR devices that doesn’t require a Facebook account. Learn more

SET GRAVITY

Enables or disables gravity on an object.

Appearance in Composition Pane
Description

An object’s gravity property can be found in its properties panel under physics. If gravity is set to false, then the object will act like it's floating in space. If true, the object will regain gravity.
Parameters

object, boolean
Sets the object’s gravity to the boolean true or false.


PREREQUISITE READING

SET STIMULATED precedes this tutorial


Example 1: Disable gravity with an event

When object is released by player we set gravity to false. Imagine if this script was attached to an object released in a zero-gravity environment.

Next Up