A physics-enabled button. Activated by physically pressing the button, with events for press and unpress. /summary>
More...
|
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) |
|
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) |
|
|
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 = () => { } |
|
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< InteractionController > | OnPerControllerHoverBegin |
| 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< InteractionController > | OnPerControllerHoverEnd |
| 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< InteractionController > | OnPerControllerPrimaryHoverBegin |
| 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< InteractionController > | OnPerControllerPrimaryHoverEnd |
| 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...
|
|
Pose? | latestScheduledGraspPose = 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< InteractionController > | OnPerControllerGraspBegin |
| Called whenever an interaction controller grasps this object. More...
|
|
Action< InteractionController > | OnPerControllerGraspEnd |
| Called whenever an interaction controller stops grasping this object. More...
|
|
Action< InteractionController > | OnSuspensionBegin |
| 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< InteractionController > | OnSuspensionEnd |
| 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< InteractionController > | OnPerControllerContactBegin |
| Called whenever an interaction controller begins colliding with this object. More...
|
|
Action< InteractionController > | OnPerControllerContactEnd |
| Called whenever an interaction controller stops colliding with this object. More...
|
|
GraspedMovementType | graspedMovementType |
|
|
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...
|
|
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< InteractionController > | hoveringControllers [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< InteractionController > | primaryHoveringControllers [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< InteractionController > | graspingControllers [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< InteractionHand > | graspingHands [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< InteractionController > | contactingControllers [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...
|
|
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] |
|
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.