OctoXR
Search…
⌃K

OVR Hand Input Data Provider

  • HandInputDataProvider derived script that handles the hand tracking based input specific for Oculus platform
  • Reads the hand tracking data using Oculus' API and sets the input state defined in OVRHandInputDataProvider's base behaviours
  • It is a good idea to set the InputRoot property inherited from InputDataProvider to OVRCameraRig's Transform if one is in use in a given scene. That way if the camera rig object gets moved (like it is in teleport functionality for example) all of the hand-representing objects that use OVRHandInputDataProvider will move with it properly
Members defined in this script are:

Public properties

HandType HandType { get; set; }
  • Specifies for which hand is input being provided by this script, left or right
HandSkeletonPose BindPose { get; set; }
  • HandSkeletonPose is a scriptable object that stores the poses (positions and rotations) of each of the hand skeleton bones. BindPose property specifies the default pose for a hand skeleton which can be viewed as the pose for a hand skeleton at rest
  • This property is optional, OVRHandInputDataProvider will use poses obtained from the Oculus Integration package's default skeleton if nothing is assigned
  • OctoXR base package includes HandSkeletonPose assets, one for the left and one for the right hand, so there is no need to manually create one except if there is a need for more custom hands to be used

Protected methods

virtual void Awake()
  • Unity built-in callback. Performs certain initialization logic for the OVRHandInputDataProvider
virtual void Start()
  • Unity built-in callback. Performs certain initialization logic for the OVRHandInputDataProvider
virtual void Update()
  • Unity built-in callback. Updates the input state in order to provide the fresh input information for rendering related logic
virtual void FixedUpdate
  • Unity built-in callback. Updates the input state in order to provide the fresh input information for physics related logic
Hopefully it goes without saying that base implementations of these methods should always be called in their respective override methods in order to ensure the correct behaviour of this script.