mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fix toe snap (#793)
This commit is contained in:
@@ -899,14 +899,14 @@ public class LegTweaks {
|
||||
}
|
||||
|
||||
// then slerp the rotation to the new rotation based on the weight
|
||||
if (leftFootTracker) {
|
||||
if (!leftFootTracker) {
|
||||
leftFootRotation = leftFootRotation
|
||||
.interpR(
|
||||
replacePitch(leftFootRotation, -angleL),
|
||||
weightL * masterWeightL
|
||||
);
|
||||
}
|
||||
if (rightFootTracker) {
|
||||
if (!rightFootTracker) {
|
||||
rightFootRotation = rightFootRotation
|
||||
.interpR(
|
||||
replacePitch(rightFootRotation, -angleR),
|
||||
@@ -918,14 +918,14 @@ public class LegTweaks {
|
||||
if (leftFootPosition.getY() - floorLevel > footLength * MAXIMUM_TOE_DOWN_ANGLE) {
|
||||
leftToeTouched = false;
|
||||
leftToeAngle = weightL;
|
||||
} else if (leftFootPosition.getY() - floorLevel < 0.0f) {
|
||||
} else if (leftFootPosition.getY() - floorLevel <= 0.0f) {
|
||||
leftToeTouched = true;
|
||||
leftToeAngle = 1.0f;
|
||||
}
|
||||
if (rightFootPosition.getY() - floorLevel > footLength * MAXIMUM_TOE_DOWN_ANGLE) {
|
||||
rightToeTouched = false;
|
||||
rightToeAngle = weightR;
|
||||
} else if (rightFootPosition.getY() - floorLevel < 0.0f) {
|
||||
} else if (rightFootPosition.getY() - floorLevel <= 0.0f) {
|
||||
rightToeTouched = true;
|
||||
rightToeAngle = 1.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user