mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fix skeleton nodes rotation being affected by parent nodes rotation
This commit is contained in:
@@ -11,6 +11,7 @@ public class TransformNode {
|
||||
public final Transform localTransform = new Transform();
|
||||
public final Transform worldTransform = new Transform();
|
||||
public final List<TransformNode> children = new FastList<>();
|
||||
public boolean localRotation = false;
|
||||
private TransformNode parent;
|
||||
|
||||
public void attachChild(TransformNode node) {
|
||||
@@ -29,7 +30,10 @@ public class TransformNode {
|
||||
worldTransform.set(localTransform);
|
||||
} else {
|
||||
worldTransform.set(localTransform);
|
||||
worldTransform.combineWithParent(parent.worldTransform);
|
||||
if(localRotation)
|
||||
worldTransform.combineWithParent(parent.worldTransform);
|
||||
else
|
||||
worldTransform.combineWithParentGlobalRotation(localTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class TrackersUDPServer extends Thread {
|
||||
sensor = trackersMap.get(addr);
|
||||
}
|
||||
if(sensor == null) {
|
||||
IMUTracker imu = new IMUTracker("udp://" + handshakePacket.getAddress().toString(), this);
|
||||
IMUTracker imu = new IMUTracker("udp:/" + handshakePacket.getAddress().toString(), this);
|
||||
trackersConsumer.accept(imu);
|
||||
sensor = new TrackerConnection(imu, addr);
|
||||
int i = 0;
|
||||
|
||||
Reference in New Issue
Block a user