Class QuaternionControl
A generic input control reading quaternion (rotation) values.
Inherited Members
Namespace: UnityEngine.InputSystem.Controls
Syntax
public class QuaternionControl : InputControl<Quaternion>
Constructors
QuaternionControl()
Default-initialize the control.
Declaration
public QuaternionControl()
Properties
w
The W component of the quaternion.
Declaration
public AxisControl w { get; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the W component. |
x
The X component of the quaternion.
Declaration
public AxisControl x { get; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the X component. |
y
The Y component of the quaternion.
Declaration
public AxisControl y { get; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the Y component. |
z
The Z component of the quaternion.
Declaration
public AxisControl z { get; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the Z component. |
Methods
FinishSetup()
Perform final initialization tasks after the control hierarchy has been put into place.
Declaration
protected override void FinishSetup()
Overrides
Remarks
This method can be overridden to perform control- or device-specific setup work. The most common use case is for looking up child controls and storing them in local getters.
public class MyDevice : InputDevice
{
public ButtonControl button { get; private set; }
public AxisControl axis { get; private set; }
protected override void OnFinishSetup()
{
// Cache controls in getters.
button = GetChildControl("button");
axis = GetChildControl("axis");
}
}
ReadUnprocessedValueFromState(Void*)
Declaration
public override Quaternion ReadUnprocessedValueFromState(void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
Void* | statePtr |
Returns
Type | Description |
---|---|
Quaternion |
Overrides
UnityEngine.InputSystem.InputControl<UnityEngine.Quaternion>.ReadUnprocessedValueFromState(System.Void*)
WriteValueIntoState(Quaternion, Void*)
Declaration
public override void WriteValueIntoState(Quaternion value, void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | value | |
Void* | statePtr |
Overrides
UnityEngine.InputSystem.InputControl<UnityEngine.Quaternion>.WriteValueIntoState(UnityEngine.Quaternion, System.Void*)