Interface IVRInputDevice
An interface that represents a hardware VR input device (such as a controller).
Namespace: Liminal.SDK.VR.Input
Assembly: Liminal.SDK.dll
Syntax
public interface IVRInputDevice : IVRDeviceComponent
Properties
| Improve this Doc View SourceButtonCount
Gets the number of buttons the device has.
Declaration
int ButtonCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Hand
Gets the hand the device is assigned to.
Declaration
VRInputDeviceHand Hand { get; }
Property Value
Type | Description |
---|---|
VRInputDeviceHand |
Index
Gets the index of the input device.
Declaration
int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceGetAxis1D(String)
Gets the current value of the specified 1-dimensional axis on the input device.
Declaration
float GetAxis1D(string axis)
Parameters
Type | Name | Description |
---|---|---|
System.String | axis | The axis name. |
Returns
Type | Description |
---|---|
System.Single | The current value of the axis on the input device. |
GetAxis2D(String)
Gets the current value of the specified 2-dimensional axis on the input device.
Declaration
Vector2 GetAxis2D(string axis)
Parameters
Type | Name | Description |
---|---|---|
System.String | axis | The axis name. |
Returns
Type | Description |
---|---|
UnityEngine.Vector2 | The current value of the axis on the input device. |
GetButton(String)
Returns true if the specified button is currently being held.
Declaration
bool GetButton(string button)
Parameters
Type | Name | Description |
---|---|---|
System.String | button | The button name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean indicating if the specified button is currently being held. |
GetButtonDown(String)
Returns true if the specified button was pressed on this frame. This value is true only for the single frame when the button was initially pressed.
Declaration
bool GetButtonDown(string button)
Parameters
Type | Name | Description |
---|---|---|
System.String | button | The button name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean indicating if the specified button was pressed this frame. |
GetButtonUp(String)
Returns true if the specified button was released on this frame. This value is true only for the single frame when the button was released.
Declaration
bool GetButtonUp(string button)
Parameters
Type | Name | Description |
---|---|---|
System.String | button | The button name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean indicating if the specified button was released this frame. |
HasAxis1D(String)
Indicates if the input device has a 1-dimensional axis with the specified name.
Declaration
bool HasAxis1D(string axis)
Parameters
Type | Name | Description |
---|---|---|
System.String | axis | The axis name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating if the a 1-dimensional axis with the specified name exists on the input device. |
HasAxis2D(String)
Indicates if the input device has a 2-dimensional axis with the specified name.
Declaration
bool HasAxis2D(string axis)
Parameters
Type | Name | Description |
---|---|---|
System.String | axis | The axis name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating if the a 2-dimensional axis with the specified name exists on the input device. |
HasButton(String)
Indicates if the input device has a button with the specified name.
Declaration
bool HasButton(string button)
Parameters
Type | Name | Description |
---|---|---|
System.String | button | The button name. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating if the a button with the specified name exists on the input device. |
HasCapabilities(VRInputDeviceCapability)
Indicates if the input device has a specific set of capabilities. This method returns true only if ALL values within the capabilities
bitmask are available on the input device.
Declaration
bool HasCapabilities(VRInputDeviceCapability capabilities)
Parameters
Type | Name | Description |
---|---|---|
VRInputDeviceCapability | capabilities | The capabilities to check. This value is a bitmask of VRInputDeviceCapability values. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean indicating if the input device has ALL the capabilities specified by the |