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

ThrowTuner Class

Extends MonoBehaviour
Provides tunable throwing physics behavior for grabbable objects in the Interaction SDK.
This component applies customizable physics modifications when an object is thrown, including velocity adjustments, rotation alignment, and continuous flight forces.

Fields

InFlight : bool
Gets whether the object is currently in flight after being thrown.
Signature
bool Oculus.Interaction.Throw.ThrowTuner.InFlight
Gets the physics profile currently assigned to this ThrowTuner.
Signature
ThrowPhysicsProfile Oculus.Interaction.Throw.ThrowTuner.Profile

Protected Methods

ApplyBuiltInForces ()
Applies the built-in forces defined in the physics profile.
This includes gravity scaling, constant forces, and velocity damping.
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.ApplyBuiltInForces()
Returns
void
ApplyInitialTweaks ( velocity , angularVelocity )
Applies velocity and angular velocity modifications based on the physics profile.
Override this method to add custom velocity calculations.
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.ApplyInitialTweaks(ref Vector3 velocity, ref Vector3 angularVelocity)
Parameters
velocity: ref Vector3
angularVelocity: ref Vector3
Returns
void
ApplyProfile ( velocity , angularVelocity )
Applies the physics profile to the rigidbody when a throw begins.
Override this method to customize how the initial throw physics are applied.
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.ApplyProfile(Vector3 velocity, Vector3 angularVelocity)
Parameters
velocity: Vector3
angularVelocity: Vector3
Returns
void
FixedUpdate ()
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.FixedUpdate()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.OnEnable()
Returns
void
Reset ()
Auto-wires component references during development time.
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.Reset()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.Start()
Returns
void
UpdateFlight ()
Updates the object's flight behavior each physics frame.
Override this method to add custom flight behaviors like homing or magnetism.
Signature
virtual void Oculus.Interaction.Throw.ThrowTuner.UpdateFlight()
Returns
void

Methods

InjectAllThrowTuner ( profile , grabbable , rigidbody )
Sets all required dependencies for a dynamically instantiated ThrowTuner.
Signature
void Oculus.Interaction.Throw.ThrowTuner.InjectAllThrowTuner(ThrowPhysicsProfile profile, Grabbable grabbable, Rigidbody rigidbody)
Parameters
profile: ThrowPhysicsProfile  The ThrowPhysicsProfile to be assigned
grabbable: Grabbable  The Grabbable component to be assigned
rigidbody: Rigidbody  The Rigidbody component to be assigned
Returns
void
InjectGrabbable ( grabbable )
Sets the Grabbable for a dynamically instantiated ThrowTuner.
This method exists to support Interaction SDK's dependency injection pattern.
Signature
void Oculus.Interaction.Throw.ThrowTuner.InjectGrabbable(Grabbable grabbable)
Parameters
grabbable: Grabbable  The Grabbable component to be assigned
Returns
void
InjectProfile ( profile )
Sets the physics profile for a dynamically instantiated ThrowTuner.
Signature
void Oculus.Interaction.Throw.ThrowTuner.InjectProfile(ThrowPhysicsProfile profile)
Parameters
profile: ThrowPhysicsProfile  The ThrowPhysicsProfile to be assigned
Returns
void
InjectRigidbody ( rigidbody )
Sets the Rigidbody for a dynamically instantiated ThrowTuner.
Signature
void Oculus.Interaction.Throw.ThrowTuner.InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody  The Rigidbody component to be assigned
Returns
void
ResetRotation ()
Resets the object's rotation to identity (no rotation).
Useful for resetting objects after they've been thrown.
Signature
void Oculus.Interaction.Throw.ThrowTuner.ResetRotation()
Returns
void