Click or drag to resize

VelocityCalculator Class

Calculates velocity and angular velocity based on movement of the controller
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDKVelocityCalculator

Namespace:  ImmerseSDK
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
[HelpURLAttribute("https://immerse.readme.io/")]
public class VelocityCalculator : UnityEngine.MonoBehaviour

The VelocityCalculator type exposes the following members.

Constructors
  NameDescription
Public methodVelocityCalculator
Initializes a new instance of the VelocityCalculator class
Top
Properties
  NameDescription
Public propertyAngularVelocity
Angular Velocity in word coordinates
Public propertyAverageVelocity
Average Velocity in world coordinates
Public propertyForward
Points forwards from the controller
Public propertyLeft
Points left from the controller
Public propertyRight
Points right from the controller
Public propertyUp
Points upwards from the controller
Public propertyVelocity
Velocity in world coordinates
Top
Methods
  NameDescription
Protected methodFixedUpdate
Unity component method
Public methodGetAverageVelocity
We keep a history of around BufferSize number of frames for the velocity. This method returns the average velocity between of all the frames up to the specified frame.
Public methodGetVelocityAt
We keep a history of around BufferSize number of frames for the velocity. This method returns the velocity at the particular frame.
Top
Fields
  NameDescription
Public fieldStatic memberBufferSize
Track for this amount of frames in our buffer. This is used to calculate an average, or to reference as a history
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also