Set Gravity
Sets a physics world's gravity: the 2D world's in pixels a second a second (y down), the 3D world's in metres (y up).
ƒSet Gravity
X0
Y980
Z0
World2D
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Xx | number | 0 | – |
Yy | number | 980 | – |
Zz | number | 0 | – |
Worldworld | choice | 2D | One of: 2D, 3D. |
Outputs
| Pin | Type |
|---|---|
then | what happens next |
The code it becomes
The graph below written as a script would write it.
// On Scene Startstage.setGravity({ x: 0, y: 980, z: 0 }, Math.round(0) === 1 ? "3d" : "2d");In a graph
◆On Scene Start
ƒSet Gravity
X0
Y980
Z0
World2D
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.