float GetFingerValue( FingerValue value )

robot_2Generated
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 specify which finger's value you want to retrieve by passing a FingerValue enumeration value as a parameter. The method returns a float representing the finger's current state.

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
// Note: Replace with appropriate logging or UI update
// Debug.Log($"Thumb Value: {thumbValue}");
// Debug.Log($"Index Value: {indexValue}");