Struct SwipeInput
Simple object to contain information for a swipe input.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Immersive.Input
Assembly: cs.temp.dll.dll
Syntax
public readonly struct SwipeInput
Fields
EndPosition
End position of the swipe.
Declaration
public readonly Vector2 EndPosition
Field Value
| Type | Description |
|---|---|
| Vector2 |
InputId
ID of input that performed this swipe.
Declaration
public readonly int InputId
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Phase
The current phase of the input.
Declaration
public readonly InputPhase Phase
Field Value
| Type | Description |
|---|---|
| InputPhase |
PreviousPosition
Last position that this swipe was at.
Declaration
public readonly Vector2 PreviousPosition
Field Value
| Type | Description |
|---|---|
| Vector2 |
StartPosition
Position that the swipe began.
Declaration
public readonly Vector2 StartPosition
Field Value
| Type | Description |
|---|---|
| Vector2 |
SwipeDirection
Average normalized direction of the swipe. This is equivalent to
(EndPosition - StartPosition).normalized.
Declaration
public readonly Vector2 SwipeDirection
Field Value
| Type | Description |
|---|---|
| Vector2 |
SwipeDuration
Duration of the swipe in seconds.
Declaration
public readonly double SwipeDuration
Field Value
| Type | Description |
|---|---|
| System.Double |
SwipeSameness
A normalized measure of how consistent this swipe was in direction.
Declaration
public readonly float SwipeSameness
Field Value
| Type | Description |
|---|---|
| System.Single |
SwipeVelocity
Average velocity of the swipe in screen units per second.
Declaration
public readonly float SwipeVelocity
Field Value
| Type | Description |
|---|---|
| System.Single |
TravelDistance
How much the swipe travelled in screen units. Will always be at least the difference between StartPosition and EndPosition, but will be longer for non-straight lines.
Declaration
public readonly float TravelDistance
Field Value
| Type | Description |
|---|---|
| System.Single |
Properties
CurrentPosition
Declaration
public readonly Vector2 CurrentPosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |