mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fix the offsets of arms from controllers (#826)
This commit is contained in:
@@ -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