Are there any full C# examples of Orion enabled API functions where I can view the entire context? I am struggling to follow.
For example I created this script almost entirely from references in the docs, then I attempted to fill in the blanks where the context isn't existent:
private Controller controller;
private Hand leftmostHand;
void Start()
{
controller = new Controller();
}
void Update()
{
Frame frame = controller.Frame();
leftmostHand = frame.Hands.Leftmost;
int extendedFingers = 0;
for (int f = 0; f < leftmostHand.Fingers.Count; f++)
{
Finger digit = leftmostHand.Fingers[f];
if (digit.IsExtended)
extendedFingers++;
}
Debug.Log(extendedFingers);
This code above returns 0 if hand is not in the scene and 5 if the hand is in the scene. It doesn't matter how many fingers are extended, I'm not sure what I'm doing wrong here. I wish the docs showed a working example, so I could tell if I am constructing this correctly. Any help is appreciated, tia