float GetFingerValue( FingerValue value )

book_4_sparkGenerated
code_blocksInput

Description

The GetFingerValue method retrieves the current value of a specified finger on the VR controller. This value typically represents the degree of flexion or extension of the finger, ranging from 0.0 (fully extended) to 1.0 (fully curled).

Usage

To use the GetFingerValue method, you need to pass a FingerValue enumeration that specifies which finger's value you want to retrieve. The method returns a float representing the current state of the specified finger.

Example

// Example of using GetFingerValue method
VRController vrController = new VRController();
float thumbValue = vrController.GetFingerValue(FingerValue.Thumb);
float indexValue = vrController.GetFingerValue(FingerValue.Index);

// Output the values
// thumbValue and indexValue will be between 0.0 and 1.0, representing the flexion of the thumb and index finger respectively.