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

GrabInteractable Class

Makes an object grabbable by controllers so long as it's within arm's reach.

Properties

Colliders : Collider[]
[Get]
Signature
Collider [] Oculus.Interaction.GrabInteractable.Colliders
ReleaseDistance : float
[Get][Set]
Signature
float Oculus.Interaction.GrabInteractable.ReleaseDistance
ResetGrabOnGrabsUpdated : bool
[Get][Set]
Signature
bool Oculus.Interaction.GrabInteractable.ResetGrabOnGrabsUpdated
Rigidbody : Rigidbody
[Get]
Signature
Rigidbody Oculus.Interaction.GrabInteractable.Rigidbody
UseClosestPointAsGrabSource : bool
[Get][Set]
Signature
bool Oculus.Interaction.GrabInteractable.UseClosestPointAsGrabSource

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.GrabInteractable.Awake()
Returns
override void
Start ()
Signature
override void Oculus.Interaction.GrabInteractable.Start()
Returns
override void

Methods

ApplyVelocities ( linearVelocity , angularVelocity )
Applies velocities to the interactable's <cref="PhysicsGrabbable" /> if it has one.
Signature
void Oculus.Interaction.GrabInteractable.ApplyVelocities(Vector3 linearVelocity, Vector3 angularVelocity)
Parameters
linearVelocity: Vector3
angularVelocity: Vector3
Returns
void
GetGrabSourceForTarget ( target )
Determines the position of the grabbed object.
This is used as the location from which the object will be grabbed.
Signature
Pose Oculus.Interaction.GrabInteractable.GetGrabSourceForTarget(Pose target)
Parameters
target: Pose  The Transform of the interactor.
Returns
Pose
InjectAllGrabInteractable ( rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractable.InjectAllGrabInteractable(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void
InjectOptionalGrabSource ( grabSource )
Adds a grab source to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractable.InjectOptionalGrabSource(Transform grabSource)
Parameters
grabSource: Transform
Returns
void
InjectOptionalPhysicsGrabbable ( physicsGrabbable )
Adds a physics grabbable to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractable.InjectOptionalPhysicsGrabbable(PhysicsGrabbable physicsGrabbable)
Parameters
physicsGrabbable: PhysicsGrabbable
Returns
void
InjectOptionalReleaseDistance ( releaseDistance )
Adds a release distance to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractable.InjectOptionalReleaseDistance(float releaseDistance)
Parameters
releaseDistance: float
Returns
void
InjectRigidbody ( rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractable.InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void