Skip to main content

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.

Constructors​

MemberWhat it is
HandInteraction()Creates a HandInteractor.HandInteraction with default values.

Fields​

8 private and internal fields
MemberWhat it is
private float dotLenienceMinimum dot product between the move direction and each hand's valid direction.
private bool isOpenHandedTrue needs both hands open (grab at most 0.9), false needs both closed.
private float minDistanceMinimum hand movement for the gesture to count.
private PooledObjectDefinition otherParticleEffectParticle spawned when the hands belong to different players.
private PooledObjectDefinition selfParticleEffectParticle spawned when both hands are the same player's.
private SoundEffect soundEffectSound played on a match.
private HandInteractor.HandInteraction.Type typeWhether the gesture works with your own hands, other players' hands, or both.
private Vector3 validDirectionLocal direction each hand must move in. Flipped for the other hand when both are the same side.

Methods​

MemberWhat 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: