Tanoda
|
Public Member Functions | |
void | FillBones (Hand inHand) |
A utility function that sets a Hand object's bones based on this InteractionHand. Can be used to display a graphical hand that matches the physical one. More... | |
override Vector3 | GetGraspPoint () |
Returns approximately where the controller is grasping the currently-grasped InteractionBehaviour. Specifically, returns the average position of all grasping fingertips of the InteractionHand. More... | |
override void | SwapGrasp (IInteractionBehaviour replacement) |
Seamlessly swap the currently grasped object for a replacement object. It will behave like the hand released the current object, and then grasped the new object. More... | |
![]() | |
void | NotifyObjectUnregistered (IInteractionBehaviour intObj) |
void | LockPrimaryHover (InteractionBehaviour intObj) |
Sets the argument interaction object to be the current primary hover of this interaction controller and locks the primary hover state of the interaction controller. primaryHoverLocked More... | |
void | ClearHoverTracking () |
Clears all hover tracking state and fires the hover-end callbacks immediately. If objects are still in the hover radius around this controller and the controller and manager are still active, HoverBegin callbacks will be invoked again on the next fixed frame. More... | |
void | ClearHoverTrackingForObject (IInteractionBehaviour intObj) |
Clears the hover tracking state for an object and fires the hover-end callback for that object immediately. More... | |
void | ClearPrimaryHoverTracking () |
Clears primary hover tracking state for the current primary hovered object. More... | |
void | EnableSoftContact () |
void | DisableSoftContact () |
void | NotifySoftContactCollisionEnter (ContactBone bone, IInteractionBehaviour intObj, Collider collider) |
void | NotifySoftContactCollisionExit (ContactBone bone, IInteractionBehaviour intObj, Collider collider) |
void | NotifyContactBoneCollisionEnter (ContactBone contactBone, IInteractionBehaviour interactionObj) |
void | NotifyContactBoneCollisionStay (ContactBone contactBone, IInteractionBehaviour interactionObj) |
void | NotifyContactBoneCollisionExit (ContactBone contactBone, IInteractionBehaviour interactionObj) |
void | ClearContactTracking () |
Clears contact state for this controller and fires the appropriate ContactEnd callbacks on currently-contacted interaction objects immediately. More... | |
void | ClearContactTrackingForObject (IInteractionBehaviour intObj) |
Clears contact state for the specified object and fires its ContactEnd callbacks immediately. More... | |
abstract Vector3 | GetGraspPoint () |
Returns approximately where the controller is grasping the currently grasped InteractionBehaviour. This method will print an error if the controller is not currently grasping an object. More... | |
bool | TryGrasp (IInteractionBehaviour intObj) |
Checks if the provided interaction object can be grasped by this interaction controller in its current state. If so, the controller will initiate a grasp and this method will return true, otherwise this method returns false. More... | |
virtual void | SwapGrasp (IInteractionBehaviour replacement) |
Seamlessly swap the currently grasped object for a replacement object. It will behave like the hand released the current object, and then grasped the new object. More... | |
bool | ReleaseGrasp () |
Releases the object this hand is holding and returns true if the hand was holding an object, or false if there was no object to release. The released object will dispatch OnGraspEnd() immediately. The hand is guaranteed not to be holding an object directly after this method is called. More... | |
bool | ReleaseGrasp (out IInteractionBehaviour releasedObject) |
As ReleaseGrasp(), but also outputs the released object into releasedObject if the hand successfully released an object. More... | |
bool | ReleaseObject (IInteractionBehaviour toRelease) |
Attempts to release this hand's object, but only if the argument object is the object currently grasped by this hand. If the hand was holding the argument object, returns true, otherwise returns false. More... | |
virtual void | OnDrawRuntimeGizmos (RuntimeGizmoDrawer drawer) |
By default, this method will draw all of the colliders found in the contactBoneParent hierarchy, or draw the controller's soft contact representation when in soft contact mode. Optionally override this method to modify its behavior. More... | |
void | FixedUpdateController () |
bool | CheckHoverEnd (out HashSet< IInteractionBehaviour > hoverEndedObjects) |
bool | CheckHoverBegin (out HashSet< IInteractionBehaviour > hoverBeganObjects) |
bool | CheckHoverStay (out HashSet< IInteractionBehaviour > hoveredObjects) |
bool | CheckPrimaryHoverEnd (out IInteractionBehaviour primaryHoverEndedObject) |
bool | CheckPrimaryHoverBegin (out IInteractionBehaviour primaryHoverBeganObject) |
bool | CheckPrimaryHoverStay (out IInteractionBehaviour primaryHoveredObject) |
bool | CheckContactEnd (out HashSet< IInteractionBehaviour > contactEndedObjects) |
bool | CheckContactBegin (out HashSet< IInteractionBehaviour > contactBeganObjects) |
bool | CheckContactStay (out HashSet< IInteractionBehaviour > contactedObjects) |
bool | CheckGraspEnd (out IInteractionBehaviour releasedObject) |
bool | CheckGraspBegin (out IInteractionBehaviour newlyGraspedObject) |
bool | CheckGraspHold (out IInteractionBehaviour graspedObject) |
bool | CheckSuspensionBegin (out IInteractionBehaviour suspendedObject) |
bool | CheckSuspensionEnd (out IInteractionBehaviour resumedObject) |
Public Attributes | |
bool[] | enabledPrimaryHoverFingertips = new bool[5] { true, true, true, false, false } |
Set slots to true to consider the corresponding finger's fingertip for primary hover checks. 0 is the thumb, 1 is the index finger, etc. Generally speaking, enable the fingertips you'd like users to be able to use to choose and push a button, but keep in mind you pay distance check costs for each fingertip enabled! More... | |
Transform | headTransform |
![]() | |
InteractionManager | manager |
Action< InteractionBehaviour > | OnBeginPrimaryHoveringObject = (intObj) => { } |
Called when this InteractionController begins primarily hovering over an InteractionBehaviour. If the controller transitions to primarily hovering a new object, OnEndPrimaryHoveringObject will first be called on the old object, then OnBeginPrimaryHoveringObject will be called for the new object. More... | |
Action< InteractionBehaviour > | OnEndPrimaryHoveringObject = (intObj) => { } |
Called when this InteractionController stops primarily hovering over an InteractionBehaviour. If the controller transitions to primarily-hovering a new object, OnEndPrimaryHoveringObject will first be called on the old object, then OnBeginPrimaryHoveringObject will be called for the new object. More... | |
Action< InteractionBehaviour > | OnStayPrimaryHoveringObject = (intObj) => { } |
Called every (fixed) frame this InteractionController is primarily hovering over an InteractionBehaviour. More... | |
Action | OnGraspBegin = () => { } |
Called when the InteractionController begins grasping an object. More... | |
Action | OnGraspStay = () => { } |
Called while the InteractionController is grasping an object. More... | |
Action | OnGraspEnd = () => { } |
Called when the InteractionController releases an object. More... | |
Action< InteractionController > | OnContactInitialized = (intCtrl) => { } |
Called when contact data is initialized. More... | |
Func< IInteractionBehaviour, bool > | customHoverActivityFilter = null |
In addition to standard hover validity checks, you can set this filter property to further filter objects for hover consideration. Only objects for which this function returns true will be hover candidates (if the filter is not null). More... | |
Protected Member Functions | |
override void | Reset () |
override void | Start () |
override void | onObjectUnregistered (IInteractionBehaviour intObj) |
This method is called by the InteractionController when it is notified by the InteractionManager that an InteractionBehaviour has been unregistered from the Interaction Engine. If your controller has any state that remembers or tracks interaction objects, this method should clear that state, because unregistered objects won't receive state updates or callbacks from this controller's Interaction Manager anymore. More... | |
override void | fixedUpdateController () |
Called just before the InteractionController proceeds with its usual FixedUpdate. More... | |
override void | unwarpColliders (Transform primaryHoverPoint, ISpaceComponent warpedSpaceElement) |
Implementing this method is necessary to support curved spaces as rendered by a Leap Graphic Renderer. See InteractionHand for an example implementation. (Implementing this method is optional if you are not using a curved space as rendered by a Leap Graphic Renderer.) More... | |
override void | getColliderBoneTargetPositionRotation (int contactBoneIndex, out Vector3 targetPosition, out Quaternion targetRotation) |
If your controller features no moving colliders relative to itself, simply return the desired position and rotation for the given indexed contact bone in the contactBones array. (For example, by recording the local position and local rotation of each contact bone in initContact()). More complex controllers, such as InteractionHand, uses this method to set ContactBone target positions and rotations based on the tracked Leap hand. More... | |
override bool | initContact () |
Called to initialize contact colliders. See remarks for implementation requirements. More... | |
override void | onPreEnableSoftContact () |
Optionally override this method to perform logic just before soft contact is enabled for this controller. More... | |
override void | onPostDisableSoftContact () |
Optionally override this method to perform logic just after soft contact is disabled for this controller. More... | |
override bool | checkShouldGraspAtemporal (IInteractionBehaviour intObj) |
Attempts to manually initiate a grasp on the argument interaction object. A grasp will only begin if a finger and thumb are both in contact with the interaction object. If this method successfully initiates a grasp, it will return true, otherwise it will return false. More... | |
override void | fixedUpdateGraspingState () |
Called every fixed frame if grasping is enabled in the Interaction Manager. More... | |
override void | onGraspedObjectForciblyReleased (IInteractionBehaviour objectToBeReleased) |
Optionally override this method to perform logic just before a grasped object is released because it is no longer eligible to be grasped by this controller or ReleaseGrasp() was manually called on the controller. More... | |
override bool | checkShouldRelease (out IInteractionBehaviour objectToRelease) |
Returns whether this controller should release an object this fixed frame, and if so, sets objectToRelease to the object the controller should release. More... | |
override bool | checkShouldGrasp (out IInteractionBehaviour objectToGrasp) |
Returns whether this controller should grasp an object this fixed frame, and if so, sets objectToGrasp to the object the controller should grasp. More... | |
![]() | |
virtual void | Reset () |
virtual void | OnEnable () |
virtual void | Start () |
virtual void | OnDisable () |
abstract void | onObjectUnregistered (IInteractionBehaviour intObj) |
This method is called by the InteractionController when it is notified by the InteractionManager that an InteractionBehaviour has been unregistered from the Interaction Engine. If your controller has any state that remembers or tracks interaction objects, this method should clear that state, because unregistered objects won't receive state updates or callbacks from this controller's Interaction Manager anymore. More... | |
virtual void | fixedUpdateController () |
Called just before the InteractionController proceeds with its usual FixedUpdate. More... | |
abstract void | unwarpColliders (Transform primaryHoverPoint, ISpaceComponent warpedSpaceElement) |
Implementing this method is necessary to support curved spaces as rendered by a Leap Graphic Renderer. See InteractionHand for an example implementation. (Implementing this method is optional if you are not using a curved space as rendered by a Leap Graphic Renderer.) More... | |
abstract bool | initContact () |
Called to initialize contact colliders. See remarks for implementation requirements. More... | |
abstract void | getColliderBoneTargetPositionRotation (int contactBoneIndex, out Vector3 targetPosition, out Quaternion targetRotation) |
If your controller features no moving colliders relative to itself, simply return the desired position and rotation for the given indexed contact bone in the contactBones array. (For example, by recording the local position and local rotation of each contact bone in initContact()). More complex controllers, such as InteractionHand, uses this method to set ContactBone target positions and rotations based on the tracked Leap hand. More... | |
virtual void | onPreEnableSoftContact () |
Optionally override this method to perform logic just before soft contact is enabled for this controller. More... | |
virtual void | onPostDisableSoftContact () |
Optionally override this method to perform logic just after soft contact is disabled for this controller. More... | |
abstract bool | checkShouldGraspAtemporal (IInteractionBehaviour intObj) |
Checks if the provided interaction object can be grasped by this interaction controller in its current state. If so, the controller will initiate a grasp and this method will return true, otherwise this method returns false. More... | |
abstract void | fixedUpdateGraspingState () |
Called every fixed frame if grasping is enabled in the Interaction Manager. More... | |
virtual void | onGraspedObjectForciblyReleased (IInteractionBehaviour objectToBeReleased) |
Optionally override this method to perform logic just before a grasped object is released because it is no longer eligible to be grasped by this controller or ReleaseGrasp() was manually called on the controller. More... | |
abstract bool | checkShouldGrasp (out IInteractionBehaviour objectToGrasp) |
Returns whether this controller should grasp an object this fixed frame, and if so, sets objectToGrasp to the object the controller should grasp. More... | |
abstract bool | checkShouldRelease (out IInteractionBehaviour objectToRelease) |
Returns whether this controller should release an object this fixed frame, and if so, sets objectToRelease to the object the controller should release. More... | |
Properties | |
HandDataMode | handDataMode [get, set] |
LeapProvider | leapProvider [get, set] |
If the hand data mode for this InteractionHand is set to Custom, you must also manually specify the provider from which to retrieve Leap frames containing hand data. More... | |
Func< Leap.Frame, Leap.Hand > | handAccessorFunc [get, set] |
If the hand data mode for this InteractionHand is set to Custom, you must manually specify how this InteractionHand should retrieve a specific Hand data object from a Leap frame. More... | |
override bool | isTracked [get] |
Gets whether the underlying Leap hand is currently tracked. More... | |
override bool | isBeingMoved [get] |
Gets whether the underlying Leap hand is currently being moved in worldspace. More... | |
Hand | leapHand [get] |
Gets the last tracked state of the Leap hand. More... | |
override bool | isLeft [get] |
Gets whether the underlying tracked Leap hand is a left hand. More... | |
override Vector3 | position [get] |
Gets the last-tracked position of the underlying Leap hand. More... | |
override Quaternion | rotation [get] |
Gets the last-tracked rotation of the underlying Leap hand. More... | |
override Vector3 | velocity [get] |
Gets the velocity of the underlying tracked Leap hand. More... | |
override ControllerType | controllerType [get] |
Gets the controller type of this InteractionControllerBase. InteractionHands are Interaction Engine controllers implemented over Leap hands. More... | |
override InteractionHand | intHand [get] |
Returns this InteractionHand object. This property will be null if the InteractionControllerBase is not ControllerType.Hand. More... | |
override Vector3 | hoverPoint [get] |
override List< Transform > | _primaryHoverPoints [get] |
override ContactBone[] | contactBones [get] |
override GameObject | contactBoneParent [get] |
override List< Vector3 > | graspManipulatorPoints [get] |
HeuristicGrabClassifier | grabClassifier [get] |
Handles logic determining whether a hand has grabbed or released an interaction object. More... | |
![]() | |
bool | hoverEnabled [get, set] |
bool | contactEnabled [get, set] |
bool | graspingEnabled [get, set] |
abstract bool | isTracked [get] |
Gets whether the underlying object (Leap hand or a held controller) is currently in a tracked state. Objects grasped by a controller that becomes untracked will become "suspended" and receive specific suspension callbacks. (Implementing any behaviour during the suspension state is left up to the developer, however.) More... | |
abstract bool | isBeingMoved [get] |
Gets whether the underlying object (Leap hand or a held controller) is currently being moved or being actively manipulated by the player. More... | |
abstract bool | isLeft [get] |
Gets whether the underlying object (Leap hand or a held controller) represents or is held by a left hand (true) or a right hand (false). More... | |
bool | isRight [get] |
Gets whether the underlying object (Leap hand or a held controller) represents or is held by a right hand (true) or a left hand (false). More... | |
abstract Vector3 | position [get] |
Returns the current position of this controller. More... | |
abstract Quaternion | rotation [get] |
Returns the current rotation of this controller. More... | |
abstract Vector3 | velocity [get] |
Returns the current velocity of this controller. More... | |
abstract ControllerType | controllerType [get] |
Gets the type of controller this object represents underneath the InteractionController abstraction. If the type is ControllerType.Hand, the intHand property will contain the InteractionHand object this object abstracts from. More... | |
abstract InteractionHand | intHand [get] |
If this InteractionController's controllerType is ControllerType.Hand, this gets the InteractionHand, otherwise this returns null. More... | |
float | scale [get] |
Contact requires knowledge of the controller's scale. Non-uniformly scaled controllers are NOT supported. More... | |
ActivityManager< IInteractionBehaviour > | hoverActivityManager [get] |
bool | primaryHoverLocked [get, set] |
When set to true, locks the current primarily hovered object, even if the hand gets closer to a different object. More... | |
abstract Vector3 | hoverPoint [get] |
Gets the current position to check against nearby objects for hovering. Position is only used if the controller is currently tracked. For example, InteractionHand returns the center of the palm of the underlying Leap hand. More... | |
ReadonlyHashSet< IInteractionBehaviour > | hoveredObjects [get] |
Returns a set of all Interaction objects currently hovered by this InteractionController. More... | |
abstract List< Transform > | _primaryHoverPoints [get] |
ReadonlyList< Transform > | primaryHoverPoints [get] |
Gets the list of Transforms to consider against nearby objects to determine the closest object (primary hover) of this controller. More... | |
bool | isPrimaryHovering [get] |
Gets whether the InteractionController is currently primarily hovering over any interaction object. More... | |
IInteractionBehaviour | primaryHoveredObject [get] |
Gets the InteractionBehaviour that is currently this InteractionController's primary hovered object, if there is one. More... | |
float | primaryHoverDistance [get] |
Gets the distance from the closest primary hover point on this controller to its primarily hovered object, if there are any. More... | |
Vector3 | primaryHoveringPoint [get] |
Gets the position of the primary hovering point that is closest to its primary hovered object, if this controller has a primary hover. Otherwise, returns Vector3.zero. More... | |
int | primaryHoveringPointIndex [get] |
Gets the index in the primaryHoverPoints array of the primary hover point that is currently closest to this controller's primary hover object. More... | |
ReadonlyHashSet< IInteractionBehaviour > | contactingObjects [get] |
Gets the set of interaction objects that are currently touching this interaction controller. More... | |
float | softContactDislocationDistance [get, set] |
static PhysicMaterial | defaultContactBoneMaterial [get] |
bool | _wasContactInitialized [get] |
abstract ContactBone[] | contactBones [get] |
abstract GameObject | contactBoneParent [get] |
bool | softContactEnabled [get] |
bool | isGraspingObject [get] |
Gets whether the controller is currently grasping an object. More... | |
IInteractionBehaviour | graspedObject [get] |
Gets the object the controller is currently grasping, or null if there is no such object. More... | |
ReadonlyHashSet< IInteractionBehaviour > | graspCandidates [get] |
Gets the set of objects currently considered graspable. More... | |
abstract List< Vector3 > | graspManipulatorPoints [get] |
Gets the points of the controller to add to the calculation to determine how held objects should move as the controller moves. Interaction Controllers utilize the Kabsch algorithm to determine this, which is most noticeable when using Leap hands via InteractionHands to manipulate held objects. Rigid controllers may simply return a single rigid point on the controller. Refer to InteractionHand for a reference implementation for dynamic controllers (e.g. hands). More... | |
Additional Inherited Members | |
![]() | |
static float | GetHoverDistance (Vector3 hoverPoint, IInteractionBehaviour behaviour) |
Returns the hover distance from the hoverPoint to the specified object, automatically accounting for ISpaceComponent warping if necessary. More... | |
static Vector3 | TransformPoint (Vector3 worldPoint, ISpaceComponent element) |
Applies the spatial warping of the provided ISpaceComponent to a world-space point. More... | |
static void | ReleaseGrasps (IInteractionBehaviour graspedObj, ReadonlyHashSet< InteractionController > controllers) |
Helper static method for forcing multiple controllers to release their grasps on a single object simultaneously. All of the provided controllers must be grasping the argument interaction object. More... | |
![]() | |
static void | drawHoverPoint (RuntimeGizmoDrawer drawer, Vector3 pos) |
static void | drawPrimaryHoverPoint (RuntimeGizmoDrawer drawer, Vector3 pos) |
![]() | |
float | lastObjectTouchedAdjustedMassMass = 0.2f |
![]() | |
const float | DEAD_ZONE_FRACTION = 0.04F |
Definition at line 25 of file InteractionHand.cs.
|
protectedvirtual |
Returns whether this controller should grasp an object this fixed frame, and if so, sets objectToGrasp to the object the controller should grasp.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 738 of file InteractionHand.cs.
|
protectedvirtual |
Attempts to manually initiate a grasp on the argument interaction object. A grasp will only begin if a finger and thumb are both in contact with the interaction object. If this method successfully initiates a grasp, it will return true, otherwise it will return false.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 700 of file InteractionHand.cs.
|
protectedvirtual |
Returns whether this controller should release an object this fixed frame, and if so, sets objectToRelease to the object the controller should release.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 734 of file InteractionHand.cs.
void Leap.Unity.Interaction.InteractionHand.FillBones | ( | Hand | inHand | ) |
A utility function that sets a Hand object's bones based on this InteractionHand. Can be used to display a graphical hand that matches the physical one.
Definition at line 597 of file InteractionHand.cs.
|
protectedvirtual |
Called just before the InteractionController proceeds with its usual FixedUpdate.
It's generally better to override this method instead of having your InteractionController implement FixedUpdate because its execution order relative to the Interaction Manager is fixed.
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 287 of file InteractionHand.cs.
|
protectedvirtual |
Called every fixed frame if grasping is enabled in the Interaction Manager.
graspActivityManager.ActiveObjects will contain objects around the hoverPoint within the grasping radius – in other words, objects eligible to be grasped by the controller. Refer to it to avoid checking grasp eligibility against all graspable objects in your scene.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 725 of file InteractionHand.cs.
|
protectedvirtual |
If your controller features no moving colliders relative to itself, simply return the desired position and rotation for the given indexed contact bone in the contactBones array. (For example, by recording the local position and local rotation of each contact bone in initContact()). More complex controllers, such as InteractionHand, uses this method to set ContactBone target positions and rotations based on the tracked Leap hand.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 392 of file InteractionHand.cs.
|
virtual |
Returns approximately where the controller is grasping the currently-grasped InteractionBehaviour. Specifically, returns the average position of all grasping fingertips of the InteractionHand.
This method will print an error if the hand is not currently grasping an object.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 673 of file InteractionHand.cs.
|
protectedvirtual |
Called to initialize contact colliders. See remarks for implementation requirements.
initContact() should:
Contact will only begin updating after initialization succeeds, otherwise it will try to initialize again on the next fixed frame.
After initialization, the contact bone parent's layer will be set to the Interaction Manager's contactBoneLayer.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 402 of file InteractionHand.cs.
|
protectedvirtual |
Optionally override this method to perform logic just before a grasped object is released because it is no longer eligible to be grasped by this controller or ReleaseGrasp() was manually called on the controller.
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 730 of file InteractionHand.cs.
|
protectedvirtual |
This method is called by the InteractionController when it is notified by the InteractionManager that an InteractionBehaviour has been unregistered from the Interaction Engine. If your controller has any state that remembers or tracks interaction objects, this method should clear that state, because unregistered objects won't receive state updates or callbacks from this controller's Interaction Manager anymore.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 283 of file InteractionHand.cs.
|
protectedvirtual |
Optionally override this method to perform logic just after soft contact is disabled for this controller.
The InteractionHand implementation takes the opportunity to reset its contact bone's joints, which my have initialized slightly out of alignment on initial construction.
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 415 of file InteractionHand.cs.
|
protectedvirtual |
Optionally override this method to perform logic just before soft contact is enabled for this controller.
The InteractionHand implementation takes the opportunity to reset its contact bone's joints, which may have initialized slightly out of alignment on initial construction.
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 411 of file InteractionHand.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 114 of file InteractionHand.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 120 of file InteractionHand.cs.
|
virtual |
Seamlessly swap the currently grasped object for a replacement object. It will behave like the hand released the current object, and then grasped the new object.
This method will not teleport the replacement object or move it in any way, it will just cause it to be grasped. That means that you will be responsible for moving the replacement object into a reasonable position for it to be grasped.
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 717 of file InteractionHand.cs.
|
protectedvirtual |
Implementing this method is necessary to support curved spaces as rendered by a Leap Graphic Renderer. See InteractionHand for an example implementation. (Implementing this method is optional if you are not using a curved space as rendered by a Leap Graphic Renderer.)
Warps the collider transforms of this controller by the inverse of the transformation that is applied on the provided warpedSpaceElement, using the primaryHoverPoint as the pivot transform for the transformation.
ITransformer.WorldSpaceUnwarp is a useful method here. (ISpaceComponents contain references to their transformers via their anchors.)
ISpaceComponents denote game objects whose visual positions are warped from rectilinear (non-warped) space into a curved space (via, for example, a LeapCylindricalSpace, which can only be rendered correctly by the Leap Graphic Renderer). This method reverses that transformation for the hand, bringing it into the object's rectilinear space, allowing objects curved in this way to correctly collide with the bones in the hand or collider of a held controller.
The provided Transform is the closest primary hover point to any given primary hover candidate, so it is used as the pivot point for unwarping the colliders of this InteractionController.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 350 of file InteractionHand.cs.
bool [] Leap.Unity.Interaction.InteractionHand.enabledPrimaryHoverFingertips = new bool[5] { true, true, true, false, false } |
Set slots to true to consider the corresponding finger's fingertip for primary hover checks. 0 is the thumb, 1 is the index finger, etc. Generally speaking, enable the fingertips you'd like users to be able to use to choose and push a button, but keep in mind you pay distance check costs for each fingertip enabled!
Definition at line 54 of file InteractionHand.cs.
Transform Leap.Unity.Interaction.InteractionHand.headTransform |
Definition at line 109 of file InteractionHand.cs.
|
getprotected |
Definition at line 318 of file InteractionHand.cs.
|
getprotected |
Definition at line 384 of file InteractionHand.cs.
|
get |
Definition at line 379 of file InteractionHand.cs.
|
get |
Gets the controller type of this InteractionControllerBase. InteractionHands are Interaction Engine controllers implemented over Leap hands.
Definition at line 271 of file InteractionHand.cs.
|
get |
Handles logic determining whether a hand has grabbed or released an interaction object.
Definition at line 658 of file InteractionHand.cs.
|
get |
Definition at line 628 of file InteractionHand.cs.
|
getset |
If the hand data mode for this InteractionHand is set to Custom, you must manually specify how this InteractionHand should retrieve a specific Hand data object from a Leap frame.
Definition at line 85 of file InteractionHand.cs.
|
getset |
Definition at line 40 of file InteractionHand.cs.
|
get |
Definition at line 305 of file InteractionHand.cs.
|
get |
Returns this InteractionHand object. This property will be null if the InteractionControllerBase is not ControllerType.Hand.
Definition at line 279 of file InteractionHand.cs.
|
get |
Gets whether the underlying Leap hand is currently being moved in worldspace.
Definition at line 216 of file InteractionHand.cs.
|
get |
Gets whether the underlying tracked Leap hand is a left hand.
Definition at line 233 of file InteractionHand.cs.
|
get |
Gets whether the underlying Leap hand is currently tracked.
Definition at line 211 of file InteractionHand.cs.
|
get |
Gets the last tracked state of the Leap hand.
Note for those using the Leap Graphical Renderer: If the hand required warping due to the nearby presence of an object in warped (curved) space, this will return the hand as warped from that object's curved space into the rectilinear space containing its colliders. This is only relevant if you are using the Leap Graphical Renderer to render curved, interactive objects.
Definition at line 227 of file InteractionHand.cs.
|
getset |
If the hand data mode for this InteractionHand is set to Custom, you must also manually specify the provider from which to retrieve Leap frames containing hand data.
Definition at line 64 of file InteractionHand.cs.
|
get |
Gets the last-tracked position of the underlying Leap hand.
Definition at line 249 of file InteractionHand.cs.
|
get |
Gets the last-tracked rotation of the underlying Leap hand.
Definition at line 256 of file InteractionHand.cs.
|
get |
Gets the velocity of the underlying tracked Leap hand.
Definition at line 263 of file InteractionHand.cs.