Class Leap::PhysicalHands::PhysicalHandUtils¶
- class Leap.PhysicalHands.PhysicalHandUtils¶
Public Static Functions
- static float ClosestHandDistance (List<ContactHand> handsToCompare, GameObject objectToCheckDistanceFrom)¶
Calculates the shortest distance between a list of hand objects and a specified game object.
- Param handsToCompare
The list of hand objects to compare distances from.
- Param objectToCheckDistanceFrom
The game object to check distances from.
- Return
The shortest distance between the hands and the specified game object.
- static float ClosestHandBoneDistance (List<ContactHand> handsToCompare, Rigidbody objectToCheckDistanceFrom)¶
Calculates the shortest distance between a list of hand objects and a specified game object.
- Param handsToCompare
The list of hand objects to compare distances from.
- Param objectToCheckDistanceFrom
The game object to check distances from.
- Return
The shortest distance between the hands and the specified game object.
- static ContactHand ClosestHand (List<ContactHand> contactHands, GameObject objectToCheckDistanceFrom)¶
Finds the closest Contact Hand from a list of contact hands to a given object.
- Param contactHands
A list of ContactHand objects representing hands to compare distances from.
- Param objectToCheckDistanceFrom
The GameObject from which distances are measured.
- Return
The closest ContactHand to the given object, or null if the list is empty.
- static Hand ClosestHand (List<Hand> contactHands, GameObject objectToCheckDistanceFrom)
Finds the closest hand from a list of hands to a given object.