Tanoda
Leap.Unity.Interaction.InteractionButton Class Reference

A physics-enabled button. Activated by physically pressing the button, with events for press and unpress. /summary> More...

Inheritance diagram for Leap.Unity.Interaction.InteractionButton:
Leap.Unity.Interaction.InteractionBehaviour Leap.Unity.Interaction.IInteractionBehaviour Leap.Unity.Interaction.InteractionSlider Leap.Unity.Interaction.InteractionToggle

Public Types

enum  StartingPositionMode { Depressed , Relaxed }
 
- Public Types inherited from Leap.Unity.Interaction.InteractionBehaviour
enum  GraspedMovementType { Inherit , Kinematic , Nonkinematic }
 
enum  EventType {
  HoverBegin = 100 , HoverEnd = 101 , HoverStay = 102 , PerControllerHoverBegin = 110 ,
  PerControllerHoverEnd = 111 , PrimaryHoverBegin = 120 , PrimaryHoverEnd = 121 , PrimaryHoverStay = 122 ,
  PerControllerPrimaryHoverBegin = 130 , PerControllerPrimaryHoverEnd = 132 , GraspBegin = 140 , GraspEnd = 141 ,
  GraspStay = 142 , PerControllerGraspBegin = 150 , PerControllerGraspEnd = 152 , SuspensionBegin = 160 ,
  SuspensionEnd = 161 , ContactBegin = 170 , ContactEnd = 171 , ContactStay = 172 ,
  PerControllerContactBegin = 180 , PerControllerContactEnd = 181
}
 

Public Member Functions

void SetMinHeight (float minHeight)
 Sets the minimum height (x component) of the minMaxHeight property. The minimum height can't be set larger than the maximum height with this method (it will be clamped if necessary). More...
 
void setMinHeight (float minHeight)
 
void SetMaxHeight (float maxHeight)
 Sets the maximum height (y component) of the minMaxHeight property. The maximum height can't be set smaller than the minimum height with this method (it will be clamped if necessary). More...
 
void setMaxHeight (float maxHeight)
 
- Public Member Functions inherited from Leap.Unity.Interaction.InteractionBehaviour
bool ReleaseFromGrasp ()
 Releases this object from the interaction controller currently grasping it, if it is grasped, and returns true. If the object was not grasped, this method returns false. Directly after calling this method, the object is guaranteed not to be held. However, a grasp may retrigger on the next frame, if the Interaction Controller determines that the released object should be grasped. The safest way to ensure an object is released and ungraspable is to use the interaction object's ignoreGrasp property. More...
 
Vector3 GetGraspPoint (InteractionController intController)
 Returns (approximately) where the argument hand is grasping this object. If the interaction controller is not currently grasping this object, returns Vector3.zero, and logs an error to the Unity console. More...
 
void AddLinearAcceleration (Vector3 acceleration)
 Adds a linear acceleration to the center of mass of this object. Use this instead of Rigidbody.AddForce() to accelerate an Interaction object. More...
 
void AddAngularAcceleration (Vector3 acceleration)
 Adds an angular acceleration to the center of mass of this object. Use this instead of Rigidbody.AddTorque() to add angular acceleration to an Interaction object. More...
 
void SetKinematicWithoutGrasp (bool isKinematic)
 Use this if you want to modify the isKinematic state of an interaction object while it is grasped; otherwise the object's grasp settings may return the Rigidbody to the kinematic state of the object from right before it was grasped. More...
 
bool GetKinematicWithoutGrasp ()
 Use this to retrieve the isKinematic state of the interactino object ignoring any temporary modification to isKinematic that may be due to the object being grasped. More...
 
void FixedUpdateObject ()
 The InteractionManager manually calls method this after all InteractionControllerBase objects are updated via the InteractionManager's FixedUpdate(). More...
 
virtual float GetHoverDistance (Vector3 worldPosition)
 Returns a comparative distance to this interaction object. Calculated by finding the smallest distance to each of the object's colliders. More...
 
void BeginHover (List< InteractionController > controllers)
 
void EndHover (List< InteractionController > controllers)
 
void StayHovered (List< InteractionController > controllers)
 
void ClearHoverTracking (bool onlyInvalidControllers=false)
 Clears hover tracking state for this object on all of the currently-hovering controllers. New hover state will begin anew on the next fixed frame if the appropriate conditions for hover are still fulfilled. More...
 
void BeginPrimaryHover (List< InteractionController > controllers)
 
void EndPrimaryHover (List< InteractionController > controllers)
 
void StayPrimaryHovered (List< InteractionController > controllers)
 
void ClearPrimaryHoverTracking ()
 Clears primary hover tracking state for this object on all of the currently- primary-hovering controllers. New priamry hover state will begin anew on the next fixed frame if the appropriate conditions for primary hover are still fulfilled. More...
 
void BeginContact (List< InteractionController > controllers)
 
void EndContact (List< InteractionController > controllers)
 
void StayContacted (List< InteractionController > controllers)
 
void ClearContactTracking ()
 Clears contact tracking for this object on any currently-contacting controllers. If the object is still contacting controllers and they are appropriately enabled, contact will begin anew on the next fixed frame. More...
 
void BeginGrasp (List< InteractionController > controllers)
 
void EndGrasp (List< InteractionController > controllers)
 
void StayGrasped (List< InteractionController > controllers)
 
void BeginSuspension (InteractionController controller)
 
void EndSuspension (InteractionController controller)
 
void FixedUpdateForces ()
 
void RefreshInteractionColliders ()
 Recursively searches the hierarchy of this Interaction object to find all of the Colliders that are attached to its Rigidbody. These will be the colliders used to calculate distance from the controller to determine which object will become the primary hover. More...
 
void RefreshPositionLockedState ()
 Call this method if the InteractionBehaviour's Rigidbody becomes or unbecomes fully positionally locked (X, Y, Z) or if a Joint attached to the Rigidbody no longer locks its position (e.g. by being destroyed or disabled). More...
 
void FixedUpdateObject ()
 
float GetHoverDistance (Vector3 worldPosition)
 
void BeginHover (List< InteractionController > beganHovering)
 
void EndHover (List< InteractionController > endedHovering)
 
void StayHovered (List< InteractionController > currentlyHovering)
 
void BeginPrimaryHover (List< InteractionController > beganPrimaryHovering)
 
void EndPrimaryHover (List< InteractionController > endedPrimaryHovering)
 
void StayPrimaryHovered (List< InteractionController > currentlyPrimaryHovering)
 
void BeginContact (List< InteractionController > beganContact)
 
void EndContact (List< InteractionController > endedContact)
 
void StayContacted (List< InteractionController > currentlyContacting)
 
void BeginGrasp (List< InteractionController > beganGrasping)
 
void EndGrasp (List< InteractionController > endedGrasping)
 
void StayGrasped (List< InteractionController > currentlyGrasping)
 
void BeginSuspension (InteractionController beganSuspending)
 
void EndSuspension (InteractionController endedSuspending)
 

Public Attributes

StartingPositionMode startingPositionMode = StartingPositionMode.Depressed
 
Vector2 minMaxHeight = new Vector2(0f, 0.02f)
 The minimum and maximum heights the button can exist at. More...
 
float restingHeight = 0.5f
 The height that this button rests at; this value is a lerp in between the min and max height. More...
 
Action OnPress = () => { }
 
Action OnUnpress = () => { }
 
- Public Attributes inherited from Leap.Unity.Interaction.InteractionBehaviour
Action OnHoverBegin
 Called when the object becomes hovered by any nearby interaction controllers. The hover activity radius is a setting specified by the Interaction Manager. More...
 
Action OnHoverEnd
 Called when the object stops being hovered by any nearby interaction controllers. The hover activity radius is a setting specified by the Interaction Manager. More...
 
Action OnHoverStay
 Called during every fixed (physics) frame in which one or more interaction controller is within the hover activity radius around this object. The hover activity radius is a setting specified by the Interaction Manager. More...
 
Action< InteractionControllerOnPerControllerHoverBegin
 Called whenever an interaction controller enters the hover activity radius around this interaction object. The hover activity radius is a setting specified by the Interaction Manager. More...
 
Action< InteractionControllerOnPerControllerHoverEnd
 Called whenever an interaction controller leaves the hover activity radius around this interaction object. The hover activity radius is a setting specified by the Interaction Manager. More...
 
Action OnPrimaryHoverBegin
 Called when the object becomes primarily hovered by any interaction controllers, if the object was not primarily hovered by any controllers on the previous frame. More...
 
Action OnPrimaryHoverEnd
 Called when the object ceases being the primary hover of any interaction controllers, if the object was primarily hovered by one or more controllers on the previous frame. More...
 
Action OnPrimaryHoverStay
 Called every fixed (physics) frame in which one or more interaction controllers is primarily hovering over this object. Only one object may be the primary hover of a given controller at any one time. More...
 
Action< InteractionControllerOnPerControllerPrimaryHoverBegin
 Called whenever an interaction controller (a Leap hand or supported VR controller) begins primarily hovering over this object. Only one interaction object can be the primary hover of a given controller at a time. More...
 
Action< InteractionControllerOnPerControllerPrimaryHoverEnd
 Called whenever an interaction controler (a Leap hand or supported VR controller) stops primarily hovering over this object. Only one interaction object can be the primary hover of a given controller at a time. More...
 
PoselatestScheduledGraspPose = null
 Nonkinematic grasping motion applies clamped velocities to Interaction Behaviours when they are grasped to move them to their target position and rotation in the grasping hand. If a controller applies its SwapGrasp method to an interaction object that didn't reach its target pose due to velocity clamping, the swapped-out object will inherit the offset as a new target pose relative to the hand. More...
 
GraspedMovementEvent OnGraspedMovement
 Called directly after this grasped object's Rigidbody has had its position and rotation set by its currently grasping controller(s). Subscribe to this callback if you'd like to override the default behaviour for grasping objects, for example, to constrain the object's position or rotation. More...
 
Action OnGraspBegin
 Called when the object becomes grasped, if it was not already held by any interaction controllers on the previous frame. More...
 
Action OnGraspEnd
 Called when the object is no longer grasped by any interaction controllers. More...
 
Action OnGraspStay
 Called every fixed (physics) frame during which this object is grasped by one or more hands. More...
 
Action< InteractionControllerOnPerControllerGraspBegin
 Called whenever an interaction controller grasps this object. More...
 
Action< InteractionControllerOnPerControllerGraspEnd
 Called whenever an interaction controller stops grasping this object. More...
 
Action< InteractionControllerOnSuspensionBegin
 Called when the interaction controller that is grasping this interaction object loses tracking. This can occur if the controller is occluded from the sensor that is tracking it, e.g. by as the user's body or an object in the real world. More...
 
Action< InteractionControllerOnSuspensionEnd
 Called when an object ceases being suspended. An object is suspended if it is currently grasped by an untracked controller. More...
 
Action OnContactBegin
 Called when this object begins colliding with any interaction controllers, if the object was not colliding with any interaction controllers last frame. More...
 
Action OnContactEnd
 Called when the object ceases colliding with any interaction controllers, if the
object was colliding with interaction controllers last frame. More...
 
Action OnContactStay
 Called every frame during which one or more interaction controllers is colliding with this object. More...
 
Action< InteractionControllerOnPerControllerContactBegin
 Called whenever an interaction controller begins colliding with this object. More...
 
Action< InteractionControllerOnPerControllerContactEnd
 Called whenever an interaction controller stops colliding with this object. More...
 
GraspedMovementType graspedMovementType
 

Protected Member Functions

override void OnDisable ()
 
override void Start ()
 
virtual void FixedUpdate ()
 
virtual void Update ()
 
virtual Vector3 constrainDepressedLocalPosition (Vector3 localPosition)
 Clamps the input local-space position to the bounds allowed by this UI element, without clamping along the button depression axis. For buttons, this is locks the element in local-XY space, but not along the pressing axis (Z axis). More...
 
virtual void onGraspBegin ()
 
virtual void onGraspEnd ()
 
virtual void OnCollisionEnter (Collision collision)
 
virtual void OnCollisionStay (Collision collision)
 
virtual void OnTriggerEnter (Collider collider)
 
virtual void OnTriggerStay (Collider collider)
 
virtual void OnDrawGizmosSelected ()
 
- Protected Member Functions inherited from Leap.Unity.Interaction.InteractionBehaviour
virtual void OnValidate ()
 
virtual void Awake ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void Start ()
 
virtual void fixedUpdateGraspedMovement (Pose origPose, Pose newPose, List< InteractionController > controllers)
 

Protected Attributes

bool _isPressed = false
 
bool _pressedThisFrame = false
 
bool _unpressedThisFrame = false
 
Vector3 initialLocalPosition
 The initial position of this element in local space, stored on Start(). More...
 
Vector3 localPhysicsPosition
 The physical position of this element in local space; may diverge from the graphical position. More...
 
Vector3 physicsPosition = Vector3.zero
 The physical position of this element in world space; may diverge from the graphical position. More...
 
- Protected Attributes inherited from Leap.Unity.Interaction.InteractionBehaviour
InteractionController _suspendingController = null
 
Vector3 _accumulatedLinearAcceleration = Vector3.zero
 
Vector3 _accumulatedAngularAcceleration = Vector3.zero
 
List< Collider > _interactionColliders = new List<Collider>()
 

Properties

bool controlEnabled [get, set]
 
float springForce [get, set]
 
bool isPressed [get]
 Gets whether the button is currently held down. More...
 
bool isDepressed [get]
 
bool pressedThisFrame [get]
 Gets whether the button was pressed during this Update frame. More...
 
bool depressedThisFrame [get]
 
bool unpressedThisFrame [get]
 Gets whether the button was unpressed this frame. More...
 
bool unDepressedThisFrame [get]
 
float pressedAmount [get]
 Gets a normalized value between 0 and 1 based on how depressed the button currently is relative to its maximum depression. 0 represents a button fully at rest or pulled out beyond its resting position; 1 represents a fully-pressed button. More...
 
float depressedAmount [get]
 
virtual Vector3 RelaxedLocalPosition [get]
 Returns the local position of this button when it is able to relax into its target position. More...
 
- Properties inherited from Leap.Unity.Interaction.InteractionBehaviour
bool isHovered [get]
 Gets whether any interaction controller is nearby. More...
 
InteractionController closestHoveringController [get]
 Gets the closest interaction controller to this object, or null if no controller is nearby. Leap hands and supported VR controllers both count as "controllers" for the purposes of this getter. More...
 
Hand closestHoveringHand [get]
 Gets the closest Leap hand to this object, or null if no hand is nearby. More...
 
float closestHoveringControllerDistance [get]
 Gets the distance from this object to the palm of the closest hand to this object, or float.PositiveInfinity of no hand is nearby. More...
 
ReadonlyHashSet< InteractionControllerhoveringControllers [get]
 Gets all of the interaction controllers hovering near this object, whether they are Leap hands or supported VR controllers. More...
 
bool isPrimaryHovered [get]
 Gets whether this object is the primary hover for any interaction controller. More...
 
InteractionController primaryHoveringController [get]
 Gets the closest primary hovering interaction controller for this object, if it has one. An interaction controller can be a Leap hand or a supported VR controller. Any of these controllers can be the primary hover for this interaction object only if the controller is closer to it than any other interaction object. If there are multiple such controllers, this getter will return the closest one. More...
 
ReadonlyHashSet< InteractionControllerprimaryHoveringControllers [get]
 Gets the set of all interaction controllers primarily hovering over this object. More...
 
Hand primaryHoveringHand [get]
 Gets the primary hovering hand for this interaction object, if it has one. A hand is the primary hover for an interaction object only if it is closer to that object than any other interaction object. If there are multiple such hands, returns the hand closest to this object. More...
 
Finger primaryHoveringFinger [get]
 Gets the finger that is currently primarily hovering over this object, of the closest primarily hovering hand. Will return null if this object is not currently any Leap hand's primary hover. More...
 
Vector3 primaryHoveringControllerPoint [get]
 Gets the position of the primaryHoverPoint on the primary hovering interaction controller that is primarily hovering over this object. For example, if the primarily hovering controller is a Leap hand, this will be the position of the fingertip that is closest to this object. More...
 
float primaryHoverDistance [get]
 Gets the distance to the primary hover point whose controller is primarily hovering over this object. For example, if the primary hovering controller is a Leap hand, this will return the distance to the fingertip that is closest to this object. More...
 
bool isGrasped [get]
 Gets whether this object is grasped by any interaction controller. More...
 
InteractionController graspingController [get]
 Gets the controller currently grasping this object. Warning: If allowMultigrasp is enabled on this object, it might have multiple grasping controllers, in which case this will only return one of the controllers grasping this object, and there is no guarantee on which controller is returned! If no controllers (Leap hands or supported VR controllers) are currently grasping this object, returns null. More...
 
ReadonlyHashSet< InteractionControllergraspingControllers [get]
 Gets the set of all interaction controllers currently grasping this object. Interaction controllers include Leap hands via InteractionHand and supported VR controllers. More...
 
ReadonlyHashSet< InteractionHandgraspingHands [get]
 Gets a set of all Leap hands currently grasping this object. More...
 
bool isSuspended [get]
 Gets whether the object is currently suspended. An object is "suspended" if it is currently grasped by an untracked controller. For more details, refer to OnSuspensionBegin. More...
 
ReadonlyHashSet< InteractionControllercontactingControllers [get]
 Gets a set of all InteractionControllers currently contacting this interaction object. More...
 
InteractionManager manager [get, set]
 
Rigidbody rigidbody [get, protected set]
 The Rigidbody associated with this interaction object. More...
 
ISpaceComponent space [get, protected set]
 
IgnoreHoverMode ignoreHoverMode [get, set]
 
bool ignorePrimaryHover [get, set]
 
bool ignoreContact [get, set]
 
bool ignoreGrasping [get, set]
 
ContactForceMode contactForceMode [get, set]
 
bool allowMultiGrasp [get, set]
 
bool moveObjectWhenGrasped [get, set]
 
bool overrideInteractionLayer [get, set]
 
SingleLayer interactionLayer [get, protected set]
 
bool overrideNoContactLayer [get, set]
 
SingleLayer noContactLayer [get, protected set]
 
List< Collider > primaryHoverColliders [get]
 Gets the List of Colliders used for hover distance checking for this Interaction object. Hover distancing checking will affect which object is chosen for an interaction controller's primary hover, as well as for determining this object's closest hovering controller. More...
 
IGraspedPoseHandler graspedPoseHandler [get, set]
 Gets or sets the grasped pose handler for this Interaction object. More...
 
IThrowHandler throwHandler [get, set]
 Gets or sets the throw handler for this Interaction object. More...
 
bool isPositionLocked [get]
 Returns whether the InteractionBehaviour has its position fully locked by its Rigidbody settings or by any attached PhysX Joints. More...
 
- Properties inherited from Leap.Unity.Interaction.IInteractionBehaviour
string name [get]
 
GameObject gameObject [get]
 
Transform transform [get]
 
InteractionManager manager [get]
 
Rigidbody rigidbody [get]
 
ISpaceComponent space [get]
 
IgnoreHoverMode ignoreHoverMode [get]
 
bool ignorePrimaryHover [get]
 
bool ignoreContact [get]
 
bool ignoreGrasping [get]
 
bool allowMultiGrasp [get]
 
SingleLayer interactionLayer [get]
 
SingleLayer noContactLayer [get]
 
bool isGrasped [get]
 
bool isSuspended [get]
 

Additional Inherited Members

- Static Public Attributes inherited from Leap.Unity.Interaction.InteractionBehaviour
const float MAX_ANGULAR_VELOCITY = 100F
 

Detailed Description

A physics-enabled button. Activated by physically pressing the button, with events for press and unpress. /summary>

Definition at line 21 of file InteractionButton.cs.

Member Enumeration Documentation

◆ StartingPositionMode

Enumerator
Depressed 
Relaxed 

Definition at line 42 of file InteractionButton.cs.

Member Function Documentation

◆ constrainDepressedLocalPosition()

virtual Vector3 Leap.Unity.Interaction.InteractionButton.constrainDepressedLocalPosition ( Vector3  localPosition)
protectedvirtual

Clamps the input local-space position to the bounds allowed by this UI element, without clamping along the button depression axis. For buttons, this is locks the element in local-XY space, but not along the pressing axis (Z axis).

Reimplemented in Leap.Unity.Interaction.InteractionSlider.

Definition at line 407 of file InteractionButton.cs.

◆ FixedUpdate()

virtual void Leap.Unity.Interaction.InteractionButton.FixedUpdate ( )
protectedvirtual

Definition at line 222 of file InteractionButton.cs.

◆ OnCollisionEnter()

virtual void Leap.Unity.Interaction.InteractionButton.OnCollisionEnter ( Collision  collision)
protectedvirtual

Definition at line 432 of file InteractionButton.cs.

◆ OnCollisionStay()

virtual void Leap.Unity.Interaction.InteractionButton.OnCollisionStay ( Collision  collision)
protectedvirtual

Definition at line 433 of file InteractionButton.cs.

◆ OnDisable()

override void Leap.Unity.Interaction.InteractionButton.OnDisable ( )
protectedvirtual

◆ OnDrawGizmosSelected()

virtual void Leap.Unity.Interaction.InteractionButton.OnDrawGizmosSelected ( )
protectedvirtual

Reimplemented in Leap.Unity.Interaction.InteractionSlider.

Definition at line 453 of file InteractionButton.cs.

◆ onGraspBegin()

virtual void Leap.Unity.Interaction.InteractionButton.onGraspBegin ( )
protectedvirtual

Definition at line 415 of file InteractionButton.cs.

◆ onGraspEnd()

virtual void Leap.Unity.Interaction.InteractionButton.onGraspEnd ( )
protectedvirtual

Definition at line 420 of file InteractionButton.cs.

◆ OnTriggerEnter()

virtual void Leap.Unity.Interaction.InteractionButton.OnTriggerEnter ( Collider  collider)
protectedvirtual

Definition at line 436 of file InteractionButton.cs.

◆ OnTriggerStay()

virtual void Leap.Unity.Interaction.InteractionButton.OnTriggerStay ( Collider  collider)
protectedvirtual

Definition at line 437 of file InteractionButton.cs.

◆ SetMaxHeight()

void Leap.Unity.Interaction.InteractionButton.SetMaxHeight ( float  maxHeight)

Sets the maximum height (y component) of the minMaxHeight property. The maximum height can't be set smaller than the minimum height with this method (it will be clamped if necessary).

Definition at line 491 of file InteractionButton.cs.

◆ setMaxHeight()

void Leap.Unity.Interaction.InteractionButton.setMaxHeight ( float  maxHeight)

Definition at line 495 of file InteractionButton.cs.

◆ SetMinHeight()

void Leap.Unity.Interaction.InteractionButton.SetMinHeight ( float  minHeight)

Sets the minimum height (x component) of the minMaxHeight property. The minimum height can't be set larger than the maximum height with this method (it will be clamped if necessary).

Definition at line 478 of file InteractionButton.cs.

◆ setMinHeight()

void Leap.Unity.Interaction.InteractionButton.setMinHeight ( float  minHeight)

Definition at line 482 of file InteractionButton.cs.

◆ Start()

override void Leap.Unity.Interaction.InteractionButton.Start ( )
protectedvirtual

◆ Update()

virtual void Leap.Unity.Interaction.InteractionButton.Update ( )
protectedvirtual

Reimplemented in Leap.Unity.Interaction.InteractionSlider.

Definition at line 253 of file InteractionButton.cs.

Member Data Documentation

◆ _isPressed

bool Leap.Unity.Interaction.InteractionButton._isPressed = false
protected

Definition at line 92 of file InteractionButton.cs.

◆ _pressedThisFrame

bool Leap.Unity.Interaction.InteractionButton._pressedThisFrame = false
protected

Definition at line 98 of file InteractionButton.cs.

◆ _unpressedThisFrame

bool Leap.Unity.Interaction.InteractionButton._unpressedThisFrame = false
protected

Definition at line 106 of file InteractionButton.cs.

◆ initialLocalPosition

Vector3 Leap.Unity.Interaction.InteractionButton.initialLocalPosition
protected

The initial position of this element in local space, stored on Start().

Definition at line 129 of file InteractionButton.cs.

◆ localPhysicsPosition

Vector3 Leap.Unity.Interaction.InteractionButton.localPhysicsPosition
protected

The physical position of this element in local space; may diverge from the graphical position.

Definition at line 135 of file InteractionButton.cs.

◆ minMaxHeight

Vector2 Leap.Unity.Interaction.InteractionButton.minMaxHeight = new Vector2(0f, 0.02f)

The minimum and maximum heights the button can exist at.

Definition at line 48 of file InteractionButton.cs.

◆ OnPress

Action Leap.Unity.Interaction.InteractionButton.OnPress = () => { }

Definition at line 85 of file InteractionButton.cs.

◆ OnUnpress

Action Leap.Unity.Interaction.InteractionButton.OnUnpress = () => { }

Definition at line 86 of file InteractionButton.cs.

◆ physicsPosition

Vector3 Leap.Unity.Interaction.InteractionButton.physicsPosition = Vector3.zero
protected

The physical position of this element in world space; may diverge from the graphical position.

Definition at line 141 of file InteractionButton.cs.

◆ restingHeight

float Leap.Unity.Interaction.InteractionButton.restingHeight = 0.5f

The height that this button rests at; this value is a lerp in between the min and max height.

Definition at line 56 of file InteractionButton.cs.

◆ startingPositionMode

StartingPositionMode Leap.Unity.Interaction.InteractionButton.startingPositionMode = StartingPositionMode.Depressed

Definition at line 41 of file InteractionButton.cs.

Property Documentation

◆ controlEnabled

bool Leap.Unity.Interaction.InteractionButton.controlEnabled
getset

Definition at line 33 of file InteractionButton.cs.

◆ depressedAmount

float Leap.Unity.Interaction.InteractionButton.depressedAmount
get

Definition at line 123 of file InteractionButton.cs.

◆ depressedThisFrame

bool Leap.Unity.Interaction.InteractionButton.depressedThisFrame
get

Definition at line 104 of file InteractionButton.cs.

◆ isDepressed

bool Leap.Unity.Interaction.InteractionButton.isDepressed
get

Definition at line 96 of file InteractionButton.cs.

◆ isPressed

bool Leap.Unity.Interaction.InteractionButton.isPressed
get

Gets whether the button is currently held down.

Definition at line 94 of file InteractionButton.cs.

◆ pressedAmount

float Leap.Unity.Interaction.InteractionButton.pressedAmount
get

Gets a normalized value between 0 and 1 based on how depressed the button currently is relative to its maximum depression. 0 represents a button fully at rest or pulled out beyond its resting position; 1 represents a fully-pressed button.

Definition at line 121 of file InteractionButton.cs.

◆ pressedThisFrame

bool Leap.Unity.Interaction.InteractionButton.pressedThisFrame
get

Gets whether the button was pressed during this Update frame.

Definition at line 102 of file InteractionButton.cs.

◆ RelaxedLocalPosition

virtual Vector3 Leap.Unity.Interaction.InteractionButton.RelaxedLocalPosition
get

Returns the local position of this button when it is able to relax into its target position.

Definition at line 147 of file InteractionButton.cs.

◆ springForce

float Leap.Unity.Interaction.InteractionButton.springForce
getset

Definition at line 64 of file InteractionButton.cs.

◆ unDepressedThisFrame

bool Leap.Unity.Interaction.InteractionButton.unDepressedThisFrame
get

Definition at line 112 of file InteractionButton.cs.

◆ unpressedThisFrame

bool Leap.Unity.Interaction.InteractionButton.unpressedThisFrame
get

Gets whether the button was unpressed this frame.

Definition at line 110 of file InteractionButton.cs.


The documentation for this class was generated from the following file: