exp flexion

This commit is contained in:
spatialfree 2022-11-11 12:35:17 -05:00
parent 1bccc40be8
commit 84781b5ec6
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ public class Rig {
lWrist = new Pose(lCon.pos + lCon.ori * new Vec3(0, 0, 0.052f), lCon.ori);
}
public float Flexion(Hand hand, FingerId finger, float deadzone = 0.3f) {
public float Flexion(Hand hand, FingerId finger, float deadzone = 0.15f) {
float flexion = (Vec3.Dot(
PullRequest.Direction(
hand.Get(finger, JointId.Tip).position,
@ -95,7 +95,8 @@ public class Rig {
)
) + 1f) / 2;
return Math.Max(flexion - deadzone, 0f) / (1 - deadzone);
flexion = Math.Max(flexion - deadzone, 0f) / (1 - deadzone);
return flexion * flexion;
}
public Vec3 Fullstick(bool chirality) {

View file

@ -20,7 +20,6 @@ class RollsCursor : dof {
float fR = rig.Flexion(hand, FingerId.Ring);
float fL = rig.Flexion(hand, FingerId.Little);
// Biased by finger length
float stretch = (fI + fM + fR + fL) / 4f;
Vec3 to = Roll(hand, JointId.KnuckleMid, fI, fM, fR, fL);