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

StandardVelocityCalculator Class

Extends MonoBehaviour, IVelocityCalculator, ITimeConsumer
Velocity calculator that depends only on an <cref="IPoseInputDevice" />, which means it's input agnostic.
The calculator determines the final velocity of a thrown GameObject by using buffered pose data that accounts for factors like trend velocity, tangential velocity, and external velocity.

Properties

IPoseInputDevice ThrowInputDevice[Get]
Vector3 ReferenceOffset[Get]
float InstantVelocityInfluence[Get]
float TrendVelocityInfluence[Get]
float TangentialVelocityInfluence[Get]
float ExternalVelocityInfluence[Get]
float StepBackTime[Get]
float MaxPercentZeroSamplesTrendVeloc[Get]
Vector3 AddedInstantLinearVelocity[Get]
Vector3 AddedTrendLinearVelocity[Get]
Vector3 AddedTangentialLinearVelocity[Get]
Tangential velocity information, updated upon release.
Vector3 CenterOfMassToObject[Get]
Vector3 TangentialDirection[Get]
Vector3 AxisOfRotationOrigin[Get]

Fields

float UpdateFrequency[Get]

Events

Action< List< ReleaseVelocityInformation > > WhenThrowVelocitiesChanged
Action< ReleaseVelocityInformation > WhenNewSampleAvailable

Member Functions

Sets a function that returns the current time in seconds
ReleaseVelocityInformation CalculateThrowVelocity
( Transform objectThrown )
IReadOnlyList< ReleaseVelocityInformation > LastThrowVelocities ( )
void SetUpdateFrequency
( float frequency )
void InjectAllStandardVelocityCalculator
( IPoseInputDevice poseInputDevice,
BufferingParams bufferingParams )
void InjectPoseInputDevice
( IPoseInputDevice poseInputDevice )
void InjectBufferingParams
( BufferingParams bufferingParams )
void InjectOptionalTimeProvider
( Func< float > timeProvider )

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void LateUpdate ( )
Did you find this page helpful?