Member of ML.SDK.MLPlayer
Method
void MLPlayer.SetGravity(float gravity, bool resetVerticalVelocity = false)
void MLPlayer.SetGravity(float gravity, bool resetVerticalVelocity = false);
Parameters
Parameter | Type | Description |
---|---|---|
gravity | float | New gravity value. Must between -50 and 50. |
resetVerticalVelocity | bool | If set true, resets the player vertical velocity that might have resulted by the previous gravity value (falling) |
Returns
Summary
Sets the players gravity value. This value changes the gravitational forces applied to the player. Use SetGravityAxis To set the gravitational directions. The value must be between [-50,50]. Default value is -10.