compensate for feet pose mounting going inwards

This commit is contained in:
Erimel committed 2026-11-17 20:19:20 -05:00
1 parent 40848cd8a3
commit f44baef615
1 file changed
+7
@@ -46,6 +46,8 @@ import kotlin.collections.listOf
import kotlin.time.Duration.Companion.seconds
import kotlin.time.TimeMark
private const val FEET_POSE_DEG_INWARDS = 18
data class ResetsState(
val canDoYawReset: Boolean,
val canDoMountingReset: Boolean,
@@ -233,6 +235,11 @@ class ResetsManager(
}
private fun getYawOffset(bodyPart: BodyPart?, armsResetMode: ArmsMountingResetMode) = when (bodyPart) {
// Feet go back but a little inwards
BodyPart.LEFT_FOOT -> FastMath.PI - FEET_POSE_DEG_INWARDS * FastMath.DEG_TO_RAD
BodyPart.RIGHT_FOOT -> FastMath.PI + FEET_POSE_DEG_INWARDS * FastMath.DEG_TO_RAD
// Going forward
in ResetBodyParts.UPPER_LEGS -> 0f