mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-27 04:16:32 -08:00
Don't run leg IK with leg tracker for now
This commit is contained in:
1 parent
c151f1d2fa
commit
6b28bb1a71
2 files changed
+7
-4
No files matched your search
@@ -47,7 +47,7 @@ import kotlin.time.Duration.Companion.seconds
|
||||
import kotlin.time.TimeMark
|
||||
|
||||
// Feet go slightly inwards on pose mounting
|
||||
private const val FEET_POSE_DEG_INWARDS = 12 * FastMath.DEG_TO_RAD
|
||||
private const val FEET_POSE_DEG_INWARDS = 15 * FastMath.DEG_TO_RAD
|
||||
|
||||
data class ResetsState(
|
||||
val canDoYawReset: Boolean,
|
||||
|
||||
+6
-3
@@ -26,8 +26,13 @@ val POSITIONAL_IK_TARGETS = arrayOf(
|
||||
BodyPart.RIGHT_FOOT to BodyPart.RIGHT_LOWER_LEG,
|
||||
)
|
||||
|
||||
val requiredInactive = BodyPartMap(
|
||||
// TODO Use active rotations as IK constraints instead and fill in the blanks
|
||||
private val requiredInactive = BodyPartMap(
|
||||
mapOf(
|
||||
BodyPart.LEFT_LOWER_LEG to arrayOf(BodyPart.LEFT_UPPER_LEG),
|
||||
BodyPart.RIGHT_LOWER_LEG to arrayOf(BodyPart.RIGHT_UPPER_LEG),
|
||||
BodyPart.LEFT_FOOT to arrayOf(BodyPart.LEFT_LOWER_LEG, BodyPart.LEFT_UPPER_LEG),
|
||||
BodyPart.RIGHT_FOOT to arrayOf(BodyPart.RIGHT_LOWER_LEG, BodyPart.RIGHT_UPPER_LEG),
|
||||
BodyPart.LEFT_HAND to arrayOf(BodyPart.LEFT_SHOULDER, BodyPart.LEFT_UPPER_ARM, BodyPart.LEFT_LOWER_ARM),
|
||||
BodyPart.RIGHT_HAND to arrayOf(BodyPart.RIGHT_SHOULDER, BodyPart.RIGHT_UPPER_ARM, BodyPart.RIGHT_LOWER_ARM),
|
||||
),
|
||||
@@ -41,8 +46,6 @@ class PositionalTargetProcessor(
|
||||
override fun process(mutableIkTargets: IKTargets, inputSkeleton: InputSkeleton, fk: ComputedSkeleton, floorLevel: Float) {
|
||||
if (!settings.context.state.value.data.skeletonConfig.toggles.useTrackerPositions) return
|
||||
for ((bodyPart, target) in bodyParts) {
|
||||
// TODO Use active rotations as IK constraints instead and fill in the blanks
|
||||
// Disable if you have arm trackers
|
||||
if (requiredInactive[bodyPart]?.any { inputSkeleton[it]?.isRotationActive == true } == true) continue
|
||||
|
||||
mutableIkTargets[target] = inputSkeleton[bodyPart]?.position ?: continue
|
||||
|
||||
Reference in new issue
Block a user