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.
Oculus::Interaction::HandGrab::HandGrabInteractable extends Oculus.Interaction.PointerInteractable< HandGrabInteractor, HandGrabInteractable >.
Oculus::Interaction::HandGrab::HandGrabInteractable extends Oculus.Interaction.HandGrab.IHandGrabInteractable.
Oculus::Interaction::HandGrab::HandGrabInteractable extends Oculus.Interaction.IRigidbodyRef.
Oculus::Interaction::HandGrab::HandGrabInteractable extends Oculus.Interaction.ICollidersRef.

Overview

Properties

Rigidbody
bool
float
List< HandGrabPose >
Transform
General getter for the transform of the object this interactable refers to.
GrabTypeFlags
Collider[]
bool

Object Data

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

Public Member Functions

GenerateMovement
( in Pose from,
in Pose to )
When you grab the object, this determines where the object currently is and where it should move.
void
ApplyVelocities
( Vector3 linearVelocity,
Vector3 angularVelocity )
Applies velocities to the interactable's <cref="PhysicsGrabbable" /> if it has one.
bool
CalculateBestPose
( Pose userPose,
float handScale,
Handedness handedness,
ref HandGrabResult result )
Determines the best pose for the hand to snap to.
void
CalculateBestPose
( in Pose userPose,
in Pose offset,
Transform relativeTo,
float handScale,
Handedness handedness,
ref HandGrabResult result )
bool
SupportsHandedness
( Handedness handedness )
Checks if the pose supports grabbing with the given hand.
void
InjectAllHandGrabInteractable
( GrabTypeFlags supportedGrabTypes,
Rigidbody rigidbody,
GrabbingRule pinchGrabRules,
GrabbingRule palmGrabRules )
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
Adds pinch grab rules to a dynamically instantiated GameObject.
void
Adds palm grab rules to a dynamically instantiated GameObject.
void
InjectRigidbody
( Rigidbody rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
void
Adds a score modifier to a dynamically instantiated GameObject.
void
Adds a physics grabbable to a dynamically instantiated GameObject.
void
InjectOptionalHandGrabPoses
( List< HandGrabPose > handGrabPoses )
Adds hand grab poses to a dynamically instantiated GameObject.
void
Adds a movement provider to a dynamically instantiated GameObject.

Details

Detailed Description

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.

Properties

Rigidbody Oculus.Interaction.HandGrab.HandGrabInteractable.Rigidbody
No description available.
bool Oculus.Interaction.HandGrab.HandGrabInteractable.ResetGrabOnGrabsUpdated
No description available.
float Oculus.Interaction.HandGrab.HandGrabInteractable.Slippiness
No description available.
IMovementProvider Oculus.Interaction.HandGrab.HandGrabInteractable.MovementProvider
No description available.
HandAlignType Oculus.Interaction.HandGrab.HandGrabInteractable.HandAlignment
No description available.
List<HandGrabPose> Oculus.Interaction.HandGrab.HandGrabInteractable.HandGrabPoses
No description available.
Transform Oculus.Interaction.HandGrab.HandGrabInteractable.RelativeTo
General getter for the transform of the object this interactable refers to.
PoseMeasureParameters Oculus.Interaction.HandGrab.HandGrabInteractable.ScoreModifier
No description available.
GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabInteractable.SupportedGrabTypes
No description available.
GrabbingRule Oculus.Interaction.HandGrab.HandGrabInteractable.PinchGrabRules
No description available.
GrabbingRule Oculus.Interaction.HandGrab.HandGrabInteractable.PalmGrabRules
No description available.
Collider [] Oculus.Interaction.HandGrab.HandGrabInteractable.Colliders
No description available.
bool Oculus.Interaction.HandGrab.HandGrabInteractable.UsesHandPose
No description available.

Object Data

virtual void Oculus.Interaction.HandGrab.HandGrabInteractable.Reset ( )
No description available.
override void Oculus.Interaction.HandGrab.HandGrabInteractable.Awake ( )
No description available.
override void Oculus.Interaction.HandGrab.HandGrabInteractable.Start ( )
No description available.

Member Functions

IMovement Oculus.Interaction.HandGrab.HandGrabInteractable.GenerateMovement
( in Pose from,
in Pose to )
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.
void Oculus.Interaction.HandGrab.HandGrabInteractable.ApplyVelocities
( Vector3 linearVelocity,
Vector3 angularVelocity )
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.
bool Oculus.Interaction.HandGrab.HandGrabInteractable.CalculateBestPose
( Pose userPose,
float handScale,
Handedness handedness,
ref HandGrabResult result )
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 Oculus.Interaction.HandGrab.HandGrabInteractable.CalculateBestPose
( in Pose userPose,
in Pose offset,
Transform relativeTo,
float handScale,
Handedness handedness,
ref HandGrabResult result )
No description available.
bool Oculus.Interaction.HandGrab.HandGrabInteractable.SupportsHandedness
( Handedness handedness )
Checks if the pose supports grabbing with the given hand.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectAllHandGrabInteractable
( GrabTypeFlags supportedGrabTypes,
Rigidbody rigidbody,
GrabbingRule pinchGrabRules,
GrabbingRule palmGrabRules )
Adds all required scripts for <cref="HandGrabInteractable" /> to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectSupportedGrabTypes
( GrabTypeFlags supportedGrabTypes )
Adds supported grab types to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectPinchGrabRules
( GrabbingRule pinchGrabRules )
Adds pinch grab rules to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectPalmGrabRules
( GrabbingRule palmGrabRules )
Adds palm grab rules to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectRigidbody
( Rigidbody rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectOptionalScoreModifier
( PoseMeasureParameters scoreModifier )
Adds a score modifier to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectOptionalPhysicsGrabbable
( PhysicsGrabbable physicsGrabbable )
Adds a physics grabbable to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectOptionalHandGrabPoses
( List< HandGrabPose > handGrabPoses )
Adds hand grab poses to a dynamically instantiated GameObject.
void Oculus.Interaction.HandGrab.HandGrabInteractable.InjectOptionalMovementProvider
( IMovementProvider provider )
Adds a movement provider to a dynamically instantiated GameObject.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon