HandGrabInteractable Class
Makes an object grabbable by hands so long as it's within arm's reach.
A HandGrabInteractable indicates the properties about how a hand can HandGrab an object. It specifies the fingers that must perform the grab and the release and generates the events for the Pointable to move the object. Optionally it can reference a list of differently scaled HandGrabPoses to inform the interactor about the best pose the hand should adopt when grabbing the object with different sized hands.
bool ResetGrabOnGrabsUpdated[Get]
Transform RelativeTo[Get]
General getter for the transform of the object this interactable refers to.
GrabTypeFlags SupportedGrabTypes[Get]
Collider[] Colliders[Get]
IMovement GenerateMovement ( in Pose from,
in Pose to )
When you grab the object, this determines where the object currently is and where it should move.
ParametersfromThe starting position.
void ApplyVelocities ( Vector3 linearVelocity,
Vector3 angularVelocity )
Applies velocities to the interactable's <cref="PhysicsGrabbable" /> if it has one.
ParameterslinearVelocityThe linear velocity to apply.
angularVelocityThe angular velocity to apply.
bool CalculateBestPose ( Pose userPose,
float handScale,
Handedness handedness,
Determines the best pose for the hand to snap to.
ParametersuserPoseThe pose of the hand.
handScaleThe scale of the hand.
handednessThe handedness of the hand.
void CalculateBestPose ( in Pose userPose,
in Pose offset,
Transform relativeTo,
float handScale,
Handedness handedness,
bool SupportsHandedness ( Handedness handedness )
Checks if the pose supports grabbing with the given hand.
void InjectAllHandGrabInteractable ( GrabTypeFlags supportedGrabTypes,
Rigidbody rigidbody,
Adds all required scripts for <cref="HandGrabInteractable" /> to a dynamically instantiated GameObject.
void InjectSupportedGrabTypes ( GrabTypeFlags supportedGrabTypes )
Adds supported grab types to a dynamically instantiated GameObject.
void InjectPinchGrabRules Adds pinch grab rules to a dynamically instantiated GameObject.
Adds palm grab rules to a dynamically instantiated GameObject.
void InjectRigidbody ( Rigidbody rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
void InjectOptionalScoreModifier Adds a score modifier to a dynamically instantiated GameObject.
void InjectOptionalPhysicsGrabbable Adds a physics grabbable to a dynamically instantiated GameObject.
void InjectOptionalHandGrabPoses Adds hand grab poses to a dynamically instantiated GameObject.
void InjectOptionalMovementProvider Adds a movement provider to a dynamically instantiated GameObject.