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...
|
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...
|
|
|
bool | immovable |
| Set to true to avoid the Grabber to move this grabbable More...
|
|
Rigidbody | _body |
|
|
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...
|
|
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.
◆ GrabBegin()
virtual void HandPosing.Interaction.Grabbable.GrabBegin |
( |
BaseGrabber |
hand | ) |
|
|
virtual |
◆ GrabEnd()
virtual void HandPosing.Interaction.Grabbable.GrabEnd |
( |
BaseGrabber |
hand, |
|
|
Vector3 |
linearVelocity, |
|
|
Vector3 |
angularVelocity |
|
) |
| |
|
virtual |
◆ 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
-
desiredPos | Desired object world position. |
desiredRot | Desired object world rotation. |
Reimplemented in HandPosing.Interaction.PhysicsGrabbable.
◆ UnsuscribeGrabber()
void HandPosing.Interaction.Grabbable.UnsuscribeGrabber |
( |
| ) |
|
Clear all grabs on this object.
◆ 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
◆ 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:
- Runtime/Interaction/Grabbable.cs