Class CardinalUtility
Utility functions related to Cardinal directions.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs
Syntax
public static class CardinalUtility
Methods
GetNearestCardinal(Vector2)
Get the nearest cardinal direction for a given value
.
Declaration
public static Cardinal GetNearestCardinal(Vector2 value)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | Input vector, such as from a thumbstick. |
Returns
Type | Description |
---|---|
Cardinal | Returns the nearest Cardinal direction. |