Interface IGravityController
Interface for external control over the Gravity
Namespace: UnityEngine .XR.Interaction.Toolkit.Locomotion.Gravity
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public interface IGravityController
Properties
canProcess
Whether the gravity can be processed.
Gravity controllers that can process receive queries to gravity
Declaration
bool canProcess { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
It's recommended to return is
gravityPaused
Whether gravity is paused.
Declaration
bool gravityPaused { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
Methods
OnGravityLockChanged(GravityOverride)
Called from Try
Declaration
void OnGravityLockChanged(GravityOverride gravityOverride)
Parameters
Type | Name | Description |
---|---|---|
Gravity |
gravityOverride | The Gravity |
See Also
OnGroundedChanged(bool)
Called from Gravity
Declaration
void OnGroundedChanged(bool isGrounded)
Parameters
Type | Name | Description |
---|---|---|
bool | isGrounded | Whether the player is on the ground. |
See Also
RemoveGravityLock()
Removes this provider from the Gravity
Declaration
void RemoveGravityLock()
TryLockGravity(GravityOverride)
Attempts to lock gravity.
Declaration
bool TryLockGravity(GravityOverride gravityOverride)
Parameters
Type | Name | Description |
---|---|---|
Gravity |
gravityOverride | The Gravity |
Returns
Type | Description |
---|---|
bool | Whether the gravity was successfully locked. |