mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Potentially fix weird hip issues (#1244)
This commit is contained in:
1 parent
6232903691
commit
8fe2540f91
1 file changed
+4
-5
@@ -877,11 +877,10 @@ class HumanSkeleton(
|
||||
val extendedPelvisRot = extendedPelvisYawRoll(leftLegRot, rightLegRot, hipRot)
|
||||
|
||||
// Interpolate between the hipRot and extendedPelvisRot
|
||||
val newHipRot = if (extendedPelvisRot.lenSq() != 0.0f) {
|
||||
hipRot.interpR(extendedPelvisRot, hipLegsAveraging)
|
||||
} else {
|
||||
Quaternion.IDENTITY
|
||||
}
|
||||
val newHipRot = hipRot.interpR(
|
||||
if (extendedPelvisRot.lenSq() != 0.0f) extendedPelvisRot else IDENTITY,
|
||||
hipLegsAveraging,
|
||||
)
|
||||
|
||||
// Set new hip rotation
|
||||
hipBone.setRotation(newHipRot)
|
||||
|
||||
Reference in new issue
Block a user