API reference
API reference
Select your platform
No SDKs available
No versions available

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.

Fields

Rigidbody Rigidbody[Get]
List< HandGrabPose > HandGrabPoses[Get]
General getter for the transform of the object this interactable refers to.
PoseMeasureParameters ScoreModifier[Get]
GrabTypeFlags SupportedGrabTypes[Get]
GrabbingRule PinchGrabRules[Get]
GrabbingRule PalmGrabRules[Get]
bool UsesHandPose[Get]

Properties

bool ResetGrabOnGrabsUpdated[Get]
float Slippiness[Get]
IMovementProvider MovementProvider[Get]
HandAlignType HandAlignment[Get]
Collider [] Colliders[Get]

Protected Functions

virtual void Reset ( )
override void Awake ( )
override void Start ( )

Member Functions

When you grab the object, this determines where the object currently is and where it should move.
Parameters
from
The starting position.
to
The ending position.
Applies velocities to the interactable's <cref="PhysicsGrabbable" /> if it has one.
Parameters
linearVelocity
The linear velocity to apply.
angularVelocity
The angular velocity to apply.
Determines the best pose for the hand to snap to.
Parameters
userPose
The pose of the hand.
handScale
The scale of the hand.
handedness
The handedness of the hand.
result
The best pose.
void CalculateBestPose
( in Pose userPose,
in Pose offset,
Transform relativeTo,
float handScale,
Handedness handedness,
ref HandGrabResult result )
Checks if the pose supports grabbing with the given hand.
Adds all required scripts for <cref="HandGrabInteractable" /> to a dynamically instantiated GameObject.
Adds supported grab types to a dynamically instantiated GameObject.
Adds pinch grab rules to a dynamically instantiated GameObject.
Adds palm grab rules to a dynamically instantiated GameObject.
Adds a Rigidbody to a dynamically instantiated GameObject.
Adds a score modifier to a dynamically instantiated GameObject.
Adds a physics grabbable to a dynamically instantiated GameObject.
Adds hand grab poses to a dynamically instantiated GameObject.
Adds a movement provider to a dynamically instantiated GameObject.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon