HandPosing
A tool for quickly authoring hand poses to objects in VR using hand-tracking
HandPosing.Interaction.Grabbable Class Reference

This class specifies a basic grabbable object. Taking care of moving the object while beign held by a BaseGrabber using local offsets (similar to parenting transforms). More...

Inheritance diagram for HandPosing.Interaction.Grabbable:
HandPosing.Interaction.PhysicsGrabbable

Public Member Functions

virtual void GrabBegin (BaseGrabber hand)
 When the object is grabbed, record the grabber and disable physics. More...
 
virtual void GrabEnd (BaseGrabber hand, Vector3 linearVelocity, Vector3 angularVelocity)
 Restore the GrabStart values when object is released and throw it if not being held. More...
 
virtual void MoveTo (Vector3 desiredPos, Quaternion desiredRot)
 Move the object to the specified position and rotation. This is called everytime the grabber moves. More...
 
void UnsuscribeGrabber ()
 Clear all grabs on this object. More...
 

Public Attributes

Action< BaseGrabberOnGrabbed
 Event called when the object is grabbed More...
 
Action< BaseGrabberOnReleased
 Event called when the object is released More...
 

Protected Member Functions

virtual void Awake ()
 

Protected Attributes

bool immovable
 Set to true to avoid the Grabber to move this grabbable More...
 
Rigidbody _body
 

Properties

Rigidbody Body [get]
 
bool IsGrabbed [get]
 True if the object is being held by a Grabber. More...
 
Collider[] GrabPoints [get]
 General getter for the colliders eligible for grabbing. More...
 
virtual bool MultiGrab [get]
 True if the object can be held by multiple hands. Note: here not implemented, but supported by the class PhysicsGrabbable instead More...
 

Detailed Description

This class specifies a basic grabbable object. Taking care of moving the object while beign held by a BaseGrabber using local offsets (similar to parenting transforms).

Inherit this class to implement your own approach (like PHysicsGrabbable that uses joints). Or completely create your own Grabber-Grabbable system by implementing the IGrabNotifier in your custom grabber.

Member Function Documentation

◆ GrabBegin()

virtual void HandPosing.Interaction.Grabbable.GrabBegin ( BaseGrabber  hand)
virtual

When the object is grabbed, record the grabber and disable physics.

Parameters
handGrabber hand.

Reimplemented in HandPosing.Interaction.PhysicsGrabbable.

◆ GrabEnd()

virtual void HandPosing.Interaction.Grabbable.GrabEnd ( BaseGrabber  hand,
Vector3  linearVelocity,
Vector3  angularVelocity 
)
virtual

Restore the GrabStart values when object is released and throw it if not being held.

Parameters
hand
linearVelocity
angularVelocity

Reimplemented in HandPosing.Interaction.PhysicsGrabbable.

◆ MoveTo()

virtual void HandPosing.Interaction.Grabbable.MoveTo ( Vector3  desiredPos,
Quaternion  desiredRot 
)
virtual

Move the object to the specified position and rotation. This is called everytime the grabber moves.

Parameters
desiredPosDesired object world position.
desiredRotDesired object world rotation.

Reimplemented in HandPosing.Interaction.PhysicsGrabbable.

◆ UnsuscribeGrabber()

void HandPosing.Interaction.Grabbable.UnsuscribeGrabber ( )

Clear all grabs on this object.

Member Data Documentation

◆ immovable

bool HandPosing.Interaction.Grabbable.immovable
protected

Set to true to avoid the Grabber to move this grabbable

◆ OnGrabbed

Action<BaseGrabber> HandPosing.Interaction.Grabbable.OnGrabbed

Event called when the object is grabbed

◆ OnReleased

Action<BaseGrabber> HandPosing.Interaction.Grabbable.OnReleased

Event called when the object is released

Property Documentation

◆ GrabPoints

Collider [] HandPosing.Interaction.Grabbable.GrabPoints
get

General getter for the colliders eligible for grabbing.

◆ IsGrabbed

bool HandPosing.Interaction.Grabbable.IsGrabbed
get

True if the object is being held by a Grabber.

◆ MultiGrab

virtual bool HandPosing.Interaction.Grabbable.MultiGrab
getprotected

True if the object can be held by multiple hands. Note: here not implemented, but supported by the class PhysicsGrabbable instead


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