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

IVelocityCalculator Interface

Defines a velocity calculation system for throwing mechanics in the Interaction SDK.
This interface provides methods and events for calculating, tracking, and notifying about throw velocities, particularly useful for implementing realistic throwing behaviors for virtual objects.
This interface extends IThrowVelocityCalculator and adds additional functionality for:
  • Real-time velocity updates and notifications
  • Historical velocity tracking
  • Configurable update frequency for velocity calculations
Note: This interface is marked as obsolete. Use IThrowVelocityCalculator directly instead.

Properties

UpdateFrequency : float
[Get]
Gets the frequency at which the velocity calculations are updated.
The frequency is calculated in updates per second.
Signature
float Oculus.Interaction.Throw.IVelocityCalculator.UpdateFrequency

Events

WhenNewSampleAvailable : Action< ReleaseVelocityInformation >
Event triggered when a new velocity sample becomes available.
This is used for real-time velocity updates.
Signature
Action<ReleaseVelocityInformation> Oculus.Interaction.Throw.IVelocityCalculator.WhenNewSampleAvailable
WhenThrowVelocitiesChanged : Action< List< ReleaseVelocityInformation > >
Event triggered when the throw velocities are recalculated, providing a list of all current ReleaseVelocityInformation.
Signature
Action<List<ReleaseVelocityInformation> > Oculus.Interaction.Throw.IVelocityCalculator.WhenThrowVelocitiesChanged

Methods

LastThrowVelocities ()
Retrieves the most recently calculated ReleaseVelocityInformation.
Signature
IReadOnlyList<ReleaseVelocityInformation> Oculus.Interaction.Throw.IVelocityCalculator.LastThrowVelocities()
Returns
IReadOnlyList< ReleaseVelocityInformation >  A read-only list of velocity information from the last calculation.
SetUpdateFrequency ( frequency )
Configures the frequency at which velocity calculations are updated.
Signature
void Oculus.Interaction.Throw.IVelocityCalculator.SetUpdateFrequency(float frequency)
Parameters
frequency: float  The desired update frequency in updates per second.
Returns
void