mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-29 05:12:49 -08:00
Fix the offsets of arms from controllers (#826)
This commit is contained in:
1 parent
f3cefdcc61
commit
5211d340d2
1 file changed
+8
-2
+8
-2
@@ -1199,12 +1199,16 @@ public class HumanSkeleton {
|
||||
.getLocalTransform()
|
||||
.setTranslation(offset);
|
||||
case LEFT_UPPER_ARM -> {
|
||||
if (!isTrackingLeftArmFromController()) {
|
||||
if (isTrackingLeftArmFromController()) {
|
||||
leftElbowNode.getLocalTransform().setTranslation(Vector3.Companion.getNULL());
|
||||
} else {
|
||||
leftElbowNode.getLocalTransform().setTranslation(offset);
|
||||
}
|
||||
}
|
||||
case RIGHT_UPPER_ARM -> {
|
||||
if (!isTrackingRightArmFromController()) {
|
||||
if (isTrackingRightArmFromController()) {
|
||||
rightElbowNode.getLocalTransform().setTranslation(Vector3.Companion.getNULL());
|
||||
} else {
|
||||
rightElbowNode.getLocalTransform().setTranslation(offset);
|
||||
}
|
||||
}
|
||||
@@ -1254,6 +1258,8 @@ public class HumanSkeleton {
|
||||
humanPoseManager.computeNodeOffset(BoneType.RIGHT_UPPER_ARM);
|
||||
humanPoseManager.computeNodeOffset(BoneType.LEFT_LOWER_ARM);
|
||||
humanPoseManager.computeNodeOffset(BoneType.RIGHT_LOWER_ARM);
|
||||
humanPoseManager.computeNodeOffset(BoneType.LEFT_HAND);
|
||||
humanPoseManager.computeNodeOffset(BoneType.RIGHT_HAND);
|
||||
}
|
||||
|
||||
public TransformNode getTailNodeOfBone(BoneType bone) {
|
||||
|
||||
Reference in new issue
Block a user