mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Don't perform toe snap with a 0 length foot
This commit is contained in:
1 file changed
+3
-1
@@ -56,13 +56,15 @@ class ToeSnapFkProcessor(val settings: Settings) : SkeletonFkProcessor {
|
||||
for (bodyPart in bodyParts) {
|
||||
val input = mutableInputSkeleton[bodyPart] ?: continue
|
||||
if (input.isRotationActive) continue
|
||||
val length = input.offset.len()
|
||||
if (length <= 0f) continue
|
||||
val output = fk[bodyPart] ?: continue
|
||||
mutableInputSkeleton[bodyPart] = input.copy(
|
||||
rotation = snapToes(
|
||||
input.rotation,
|
||||
computeToeSnapRatio(
|
||||
output.headPosition.y,
|
||||
input.offset.len(),
|
||||
length,
|
||||
floorLevel,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user