Alter Gravity
Alter Gravity¶
Changes the gravity vector for the current scene, affecting all physics objects.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| X | The X component of the gravity vector. | Variable or Value |
| Y | The Y component of the gravity vector. | Variable or Value |
| Z | The Z component of the gravity vector. | Variable or Value |
Examples¶
Set Standard Downward Gravity¶
Sets the scene gravity to a standard downward force of -9.8 on the Y axis.
{"Data":{"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"-9.8","VariableIndex":0,"Metadata":null},"Z":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterGravityCommand"}
Disable Gravity¶
Sets the scene gravity to zero on all axes, creating a zero-gravity environment.
{"Data":{"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Z":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterGravityCommand"}
Set Gravity from Variables¶
Sets the scene gravity using values from global variables for each axis.
{"Data":{"X":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":1,"Metadata":null},"Z":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":2,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterGravityCommand"}