From ccfa6f957573d49f1f8b62e79eae651839750441 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Wed, 21 May 2025 23:18:08 -0400 Subject: [PATCH] home flexion btn test --- sk_demo/src/Rig.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sk_demo/src/Rig.cs b/sk_demo/src/Rig.cs index 6d9d9b4..6123aac 100644 --- a/sk_demo/src/Rig.cs +++ b/sk_demo/src/Rig.cs @@ -11,6 +11,8 @@ public class Rig public Vec3 perch_pos = Vec3.Zero; + public Btn home_btn = new(); + public void Init() { @@ -26,13 +28,20 @@ public class Rig view_pos = head_pos + V.XYZ(0, -6 * U.cm, 0); - // Position is specifically defined as the middle of the middle finger's root (metacarpal) bone. palm_pos = hand_1.palm.position; // For orientation, Forward is the direction the flat of the palm is facing, "Iron Man" style. X+ is to the outside of the right hand, and to the inside of the left hand. palm_ori = hand_1.palm.orientation; perch_pos = palm_pos + Vec3.Up * 8 * U.cm; + + float index_flexion = Flexion(hand_1, FingerId.Index); + home_btn.Frame(index_flexion < 0.13f, index_flexion > 0.6); + // Text.Add( + // index_flexion.ToString("F2"), + // Matrix.TR(perch_pos, head_ori * Quat.FromAngles(0, 180, 0)), + // (home_btn.held ? Color.White : Color.Black) + // ); } public struct Btn