HandInteractor.HandInteraction
A class in Root.Township, the global namespace.
One hand to hand gesture: which hands it applies to, whether hands are open or closed, the motion direction needed, and its effects.
- Listed in Global namespace: E to H
- Nested in
HandInteractor - Nested types
Type
Constructors
| Member | What it is |
|---|---|
HandInteraction() | Creates a HandInteractor.HandInteraction with default values. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private float dotLenience | Minimum dot product between the move direction and each hand's valid direction. |
private bool isOpenHanded | True needs both hands open (grab at most 0.9), false needs both closed. |
private float minDistance | Minimum hand movement for the gesture to count. |
private PooledObjectDefinition otherParticleEffect | Particle spawned when the hands belong to different players. |
private PooledObjectDefinition selfParticleEffect | Particle spawned when both hands are the same player's. |
private SoundEffect soundEffect | Sound played on a match. |
private HandInteractor.HandInteraction.Type type | Whether the gesture works with your own hands, other players' hands, or both. |
private Vector3 validDirection | Local direction each hand must move in. Flipped for the other hand when both are the same side. |
Methods
| Member | What it is |
|---|---|
bool IsValid(HandInteractor interactor, HandInteractor otherInteractor, float distance) | Checks both hands match this gesture and, if so, plays its particle and sound. Returns whether it matched. |
Used in
Members of other types that take, return or hold a HandInteraction: