Class GravitySensor
Input device representing a gravity sensor.
Inherited Members
Namespace: UnityEngine.InputSystem
Syntax
public class GravitySensor : Sensor
Remarks
A gravity sensor let's you determine the direction of the gravity vector relative to a device, and can be useful to control content by device orientation. This is usually derived from a hardware Accelerometer, by subtracting the effect of linear acceleration (see LinearAccelerationSensor).
Properties
current
Declaration
public static GravitySensor current { get; }
Property Value
Type | Description |
---|---|
GravitySensor |
gravity
Declaration
public Vector3Control gravity { get; }
Property Value
Type | Description |
---|---|
Vector3Control |
Methods
FinishSetup()
Declaration
protected override void FinishSetup()
Overrides
MakeCurrent()
Declaration
public override void MakeCurrent()
Overrides
OnRemoved()
Declaration
protected override void OnRemoved()