float GetFingerSplay( int index )

book_4_sparkGenerated
code_blocksInput

Description

The GetFingerSplay method retrieves the splay value of a specified finger on the VR controller. The splay value represents the degree to which a finger is spread apart from its adjacent fingers, providing a measure of finger separation.

Usage

To use the GetFingerSplay method, call it on an instance of the VRController class, passing the index of the finger you want to query. The method returns a float value representing the splay of the specified finger.

The index parameter should be an integer corresponding to the finger you are interested in. Typically, indices are mapped as follows:

  • 0 - Thumb
  • 1 - Index Finger
  • 2 - Middle Finger
  • 3 - Ring Finger
  • 4 - Little Finger

Example

// Example of using GetFingerSplay
VRController vrController = new VRController();

// Get the splay value of the index finger
float indexFingerSplay = vrController.GetFingerSplay(1);

// Output the splay value
// Note: Avoid using Console.WriteLine in Sandbox environment
// Use the value in your application logic instead
float splayValue = indexFingerSplay;