Tanoda
|
Public Member Functions | |
void | RefreshControllerConnection () |
override 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... | |
override void | OnDrawRuntimeGizmos (RuntimeGizmos.RuntimeGizmoDrawer drawer) |
![]() | |
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 | |
float | pollConnectionInterval = 2f |
new List< Transform > | primaryHoverPoints |
Transform | graspPoint |
float | maxGraspDistance = 0.06F |
string | graspButtonAxis |
float | graspTimingSlop = 0.10F |
Func< float > | graspAxisOverride = null |
By default, InteractionVRController uses Input.GetAxis(graspButtonAxis) to determine the "depression" state for the grasp button. By setting this value to something other than null, it is possible to modify this behavior to instead retrieve a grasping axis value based on arbitrary code. More... | |
![]() | |
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 () |
virtual void | OnValidate () |
override void | Start () |
override void | fixedUpdateController () |
Called just before the InteractionController proceeds with its usual FixedUpdate. More... | |
override void | onObjectUnregistered (IInteractionBehaviour intObj) |
InteractionVRController doesn't need to do anything when an object is unregistered. 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 bool | initContact () |
Called to initialize contact colliders. See remarks for implementation requirements. 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 void | fixedUpdateGraspingState () |
Called every fixed frame if grasping is enabled in the Interaction Manager. 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... | |
override bool | checkShouldGraspAtemporal (IInteractionBehaviour intObj) |
If the provided object is within range of this VR controller's grasp point and the grasp button is currently held down, this method will manually initiate a grasp and return true. Otherwise, the method returns false. 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... | |
![]() | |
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 | |
bool | isUsingCustomTracking [get] |
string | deviceJoystickTokens [get] |
Chirality | chirality [get] |
bool | pollConnection [get, set] |
Whether to continuously poll attached joystick data for a joystick that matches the device joystick tokens, using Input.GetJoystickNames(). This call allocates garbage, so be wary of setting a low polling interval. More... | |
List< GameObject > | enableObjectsOnlyWhenTracked [get] |
These objects will be made active only while the controller is tracked. For more fine-tuned behavior, we recommend implementing your own logic. More... | |
bool | isJoystickDetected [get] |
Whether the device joystick tokens matched an entry in Input.GetJoystickNames(). If pollConnection is set to true, this status is refreshed periodically based on the pollConnectionInterval, but only while the joystick tokens have not been detected from Input.GetJoystickNames(). Call RefreshControllerConnection() to detect if the controller has been disconnected. More... | |
IXRControllerTrackingProvider | trackingProvider [get, set] |
override bool | isTracked [get] |
Gets whether or not the underlying controller is currently tracked and any joystick token filtering has confirmed that this controller has been detected as a connected joystick. More... | |
override bool | isBeingMoved [get] |
Gets whether or not the underlying controller is currently being moved in world space, but relative to the Interaction Manager's transform. The Interaction Manager is usually a sibling of the main camera beneath the camera rig transform, so that if your application is only translating the player rig in space, this method won't incorrectly return true. More... | |
VRNode | xrNode [get] |
Gets the XRNode associated with this XR controller. Note: If the tracking mode for this controller is specified as ControllerTrackingMode.Custom, this value may be ignored. More... | |
override bool | isLeft [get] |
Gets whether the controller is a left-hand controller. More... | |
override Vector3 | position [get] |
Gets the last-tracked position of the controller. More... | |
override Quaternion | rotation [get] |
Gets the last-tracked rotation of the controller. More... | |
override Vector3 | velocity [get] |
Gets the current velocity of the controller. More... | |
override ControllerType | controllerType [get] |
Gets the type of controller this is. For InteractionVRController, the type is always ControllerType.VRController. More... | |
override InteractionHand | intHand [get] |
This implementation of InteractionControllerBase does not represent a Leap hand, so it need not return an InteractionHand object. More... | |
override Vector3 | hoverPoint [get] |
Gets the center point used for hover distance checking. More... | |
override List< Transform > | _primaryHoverPoints [get] |
Gets the list of points to be used to perform higher-fidelity "primary hover" checks. Only one interaction object may be the primary hover of an interaction controller (Leap hand or otherwise) at a time. Interface objects such as buttons can only be pressed when they are primarily hovered by an interaction controller, so it's best to return points on whatever you expect to be able to use to push buttons with the controller. More... | |
override ContactBone[] | contactBones [get] |
override GameObject | contactBoneParent [get] |
float | graspDepressedValue [get, set] |
The value between 0 and 1 past which the grasping axis value will cause an attempt to grasp a graspable interaction object near the grasp point. More... | |
float | graspReleasedValue [get, set] |
If the grasping axis value passes the graspDepressedValue, it must then drop underneath this value in order to release the grasp attempt (potentially releasing a held object) and allow a new grasp attempt to occur. More... | |
override List< Vector3 > | graspManipulatorPoints [get] |
Gets a list returning this controller's hoverPoint. Because the InteractionVRController represents a rigid controller, any two points that rigidly move with the controller position and orientation will provide enough information. 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 27 of file InteractionXRController.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 792 of file InteractionXRController.cs.
|
protectedvirtual |
If the provided object is within range of this VR controller's grasp point and the grasp button is currently held down, this method will manually initiate a grasp and return true. Otherwise, the method returns false.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 808 of file InteractionXRController.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 826 of file InteractionXRController.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 180 of file InteractionXRController.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 705 of file InteractionXRController.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 631 of file InteractionXRController.cs.
|
virtual |
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.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 701 of file InteractionXRController.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 537 of file InteractionXRController.cs.
override void Leap.Unity.Interaction.InteractionXRController.OnDrawRuntimeGizmos | ( | RuntimeGizmos.RuntimeGizmoDrawer | drawer | ) |
Definition at line 839 of file InteractionXRController.cs.
|
protectedvirtual |
InteractionVRController doesn't need to do anything when an object is unregistered.
Implements Leap.Unity.Interaction.InteractionController.
Definition at line 469 of file InteractionXRController.cs.
|
protectedvirtual |
Definition at line 170 of file InteractionXRController.cs.
void Leap.Unity.Interaction.InteractionXRController.RefreshControllerConnection | ( | ) |
Definition at line 230 of file InteractionXRController.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 154 of file InteractionXRController.cs.
|
protectedvirtual |
Reimplemented from Leap.Unity.Interaction.InteractionController.
Definition at line 174 of file InteractionXRController.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 498 of file InteractionXRController.cs.
Func<float> Leap.Unity.Interaction.InteractionXRController.graspAxisOverride = null |
By default, InteractionVRController uses Input.GetAxis(graspButtonAxis) to determine the "depression" state for the grasp button. By setting this value to something other than null, it is possible to modify this behavior to instead retrieve a grasping axis value based on arbitrary code.
A grasp is attempted when the grasp button axis value returned by this method becomes larger than the graspButtonDepressedValue, and a grasp is released when the grasp button axis value returned by this method becomes smaller than the graspButtonReleasedValue. Both of these values provide public setters.
Definition at line 653 of file InteractionXRController.cs.
string Leap.Unity.Interaction.InteractionXRController.graspButtonAxis |
Definition at line 119 of file InteractionXRController.cs.
Transform Leap.Unity.Interaction.InteractionXRController.graspPoint |
Definition at line 113 of file InteractionXRController.cs.
float Leap.Unity.Interaction.InteractionXRController.graspTimingSlop = 0.10F |
Definition at line 126 of file InteractionXRController.cs.
float Leap.Unity.Interaction.InteractionXRController.maxGraspDistance = 0.06F |
Definition at line 115 of file InteractionXRController.cs.
float Leap.Unity.Interaction.InteractionXRController.pollConnectionInterval = 2f |
Definition at line 84 of file InteractionXRController.cs.
new List<Transform> Leap.Unity.Interaction.InteractionXRController.primaryHoverPoints |
Definition at line 105 of file InteractionXRController.cs.
|
getprotected |
Gets the list of points to be used to perform higher-fidelity "primary hover" checks. Only one interaction object may be the primary hover of an interaction controller (Leap hand or otherwise) at a time. Interface objects such as buttons can only be pressed when they are primarily hovered by an interaction controller, so it's best to return points on whatever you expect to be able to use to push buttons with the controller.
Definition at line 490 of file InteractionXRController.cs.
|
get |
Definition at line 58 of file InteractionXRController.cs.
|
getprotected |
Definition at line 533 of file InteractionXRController.cs.
|
get |
Definition at line 528 of file InteractionXRController.cs.
|
get |
Gets the type of controller this is. For InteractionVRController, the type is always ControllerType.VRController.
Definition at line 453 of file InteractionXRController.cs.
|
get |
Definition at line 51 of file InteractionXRController.cs.
|
get |
These objects will be made active only while the controller is tracked. For more fine-tuned behavior, we recommend implementing your own logic.
controller.isJoystickDetected and controller.isTracked are useful for this.
Definition at line 141 of file InteractionXRController.cs.
|
getset |
The value between 0 and 1 past which the grasping axis value will cause an attempt to grasp a graspable interaction object near the grasp point.
Definition at line 660 of file InteractionXRController.cs.
|
get |
Gets a list returning this controller's hoverPoint. Because the InteractionVRController represents a rigid controller, any two points that rigidly move with the controller position and orientation will provide enough information.
Definition at line 683 of file InteractionXRController.cs.
|
getset |
If the grasping axis value passes the graspDepressedValue, it must then drop underneath this value in order to release the grasp attempt (potentially releasing a held object) and allow a new grasp attempt to occur.
Definition at line 671 of file InteractionXRController.cs.
|
get |
Gets the center point used for hover distance checking.
Definition at line 478 of file InteractionXRController.cs.
|
get |
This implementation of InteractionControllerBase does not represent a Leap hand, so it need not return an InteractionHand object.
Definition at line 461 of file InteractionXRController.cs.
|
get |
Gets whether or not the underlying controller is currently being moved in world space, but relative to the Interaction Manager's transform. The Interaction Manager is usually a sibling of the main camera beneath the camera rig transform, so that if your application is only translating the player rig in space, this method won't incorrectly return true.
Definition at line 388 of file InteractionXRController.cs.
|
get |
Whether the device joystick tokens matched an entry in Input.GetJoystickNames(). If pollConnection is set to true, this status is refreshed periodically based on the pollConnectionInterval, but only while the joystick tokens have not been detected from Input.GetJoystickNames(). Call RefreshControllerConnection() to detect if the controller has been disconnected.
Joystick detection is skipped if deviceJoystickTokens is null or empty, causing this check to always return true.
Definition at line 212 of file InteractionXRController.cs.
|
get |
Gets whether the controller is a left-hand controller.
Definition at line 413 of file InteractionXRController.cs.
|
get |
Gets whether or not the underlying controller is currently tracked and any joystick token filtering has confirmed that this controller has been detected as a connected joystick.
Definition at line 375 of file InteractionXRController.cs.
|
get |
Definition at line 42 of file InteractionXRController.cs.
|
getset |
Whether to continuously poll attached joystick data for a joystick that matches the device joystick tokens, using Input.GetJoystickNames(). This call allocates garbage, so be wary of setting a low polling interval.
The connection is polled only until a joystick is detected to minimize allocation. Once a joystick has been detected (isJoystickDetected), you must manually call RefreshControllerConnection() to check if the joystick is no longer detected.
Definition at line 75 of file InteractionXRController.cs.
|
get |
Gets the last-tracked position of the controller.
Definition at line 420 of file InteractionXRController.cs.
|
get |
Gets the last-tracked rotation of the controller.
Definition at line 429 of file InteractionXRController.cs.
|
getset |
Definition at line 255 of file InteractionXRController.cs.
|
get |
Gets the current velocity of the controller.
Definition at line 438 of file InteractionXRController.cs.
|
get |
Gets the XRNode associated with this XR controller. Note: If the tracking mode for this controller is specified as ControllerTrackingMode.Custom, this value may be ignored.
Definition at line 405 of file InteractionXRController.cs.