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

PhysicsGrabbable Class

Extends MonoBehaviour
Obsolete: Makes the GameObject it's attached to kinematic during a grab.
As a result, the GameObject can be transformed 1-1 without any undesirable effects. The features of this type are now available in Grabbable and RigidbodyKinematicLocker, which are the recommended way for new code to leverage physics in grab interactions.

Protected Fields

_started : bool
Signature
bool Oculus.Interaction.PhysicsGrabbable._started

Events

WhenVelocitiesApplied : Action< Vector3, Vector3 >
An event which signals when new velocities have been applied to this grabbable, for example in response to a grab by a GrabInteractor.
Handlers must accept two Vector3 arguments: linear velocity, and angular velocity.
Signature
Action<Vector3, Vector3> Oculus.Interaction.PhysicsGrabbable.WhenVelocitiesApplied

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.PhysicsGrabbable.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.PhysicsGrabbable.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.PhysicsGrabbable.OnEnable()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.PhysicsGrabbable.Start()
Returns
void

Methods

ApplyVelocities ( linearVelocity , angularVelocity )
Sets the velocities to be applied to the grabbable during the next Unity fixed update.
Note that, since the velocities are not actually applied synchronously here, this will not trigger an invocation of WhenVelocitiesApplied; that will happen when the velocities are actually provided to the physics system during the next fixed update.
Signature
void Oculus.Interaction.PhysicsGrabbable.ApplyVelocities(Vector3 linearVelocity, Vector3 angularVelocity)
Parameters
linearVelocity: Vector3  The linear velocity to be applied
angularVelocity: Vector3  The angular velocity to be applied
Returns
void
InjectAllPhysicsGrabbable ( pointable , rigidbody )
Injects all required dependencies for a dynamically instantiated PhysicsGrabbable; effectively wraps InjectPointable(IPointable) and InjectRigidbody(Rigidbody).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectAllPhysicsGrabbable(IPointable pointable, Rigidbody rigidbody)
Parameters
pointable: IPointable
rigidbody: Rigidbody
Returns
void
InjectAllPhysicsGrabbable ( grabbable , rigidbody )
Obsolete: Injects all required dependencies for a dynamically instantiated PhysicsGrabbable; effectively wraps InjectPointable(IPointable) and InjectRigidbody(Rigidbody).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectAllPhysicsGrabbable(Grabbable grabbable, Rigidbody rigidbody)
Parameters
grabbable: Grabbable
rigidbody: Rigidbody
Returns
void
InjectGrabbable ( grabbable )
Obsolete: wraps InjectPointable(IPointable), which should be used directly in new code.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectGrabbable(Grabbable grabbable)
Parameters
grabbable: Grabbable
Returns
void
InjectOptionalScaleMassWithSize ( scaleMassWithSize )
Sets whether or not to scale mass with size for a dynamically instantiated PhysicsGrabbable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectOptionalScaleMassWithSize(bool scaleMassWithSize)
Parameters
scaleMassWithSize: bool
Returns
void
InjectPointable ( pointable )
Sets an IPointable for a dynamically instantiated PhysicsGrabbable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectPointable(IPointable pointable)
Parameters
pointable: IPointable
Returns
void
InjectRigidbody ( rigidbody )
Sets the Unity Rigidbody for a dynamically instantiated PhysicsGrabbable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PhysicsGrabbable.InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void