mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
compensate for feet pose mounting going inwards
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user