mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-29 05:12:49 -08:00
wtf Java (#603)
This commit is contained in:
1 parent
cd5c4dc219
commit
020ee98e47
1 file changed
+4
-2
@@ -1177,16 +1177,18 @@ public class HumanSkeleton {
|
||||
) {
|
||||
// Clone the hip since we're modifying it and returning it
|
||||
hip = hip.clone();
|
||||
// Clone the knees here because otherwise it doesn't work because Java
|
||||
leftKnee = leftKnee.clone();
|
||||
rightKnee = rightKnee.clone();
|
||||
|
||||
|
||||
// Get the knees' rotation relative to where we expect them to be.
|
||||
// The angle between your knees and hip can be over 180 degrees...
|
||||
hip.mult(FORWARD_QUATERNION, rotBuf1);
|
||||
if (rotBuf1.dot(leftKnee) < 0.0f) {
|
||||
leftKnee = leftKnee.clone();
|
||||
leftKnee.negateLocal();
|
||||
}
|
||||
if (rotBuf1.dot(rightKnee) < 0.0f) {
|
||||
rightKnee = rightKnee.clone();
|
||||
rightKnee.negateLocal();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user