From 43bc140d422b84895cba9723c211b02d0c711103 Mon Sep 17 00:00:00 2001 From: Eiren Rain Date: Mon, 5 Jul 2021 17:00:33 +0300 Subject: [PATCH] Fix hips switching place when changing hips width --- src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java | 4 +++- .../java/io/eiren/vr/processor/HumanSekeletonWithLegs.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java b/src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java index d627c11c4c..612fa7f12d 100644 --- a/src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java +++ b/src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java @@ -134,7 +134,7 @@ private void waitForPipesToOpen() { initTrackerPipe(trackerPipe, i); } if(spawnOneTracker) - return; + break; } } @@ -252,6 +252,8 @@ private void createPipes() throws IOException { throw new IOException("Can't open " + pipeName + " pipe: " + Kernel32.INSTANCE.GetLastError()); LogManager.log.info("[VRBridge] Pipe " + pipeName + " created"); trackerPipes.add(new Pipe(pipeHandle, pipeName)); + if(spawnOneTracker) + break; } LogManager.log.info("[VRBridge] Pipes are open"); } catch(IOException e) { diff --git a/src/main/java/io/eiren/vr/processor/HumanSekeletonWithLegs.java b/src/main/java/io/eiren/vr/processor/HumanSekeletonWithLegs.java index 703163ea20..5656ac4561 100644 --- a/src/main/java/io/eiren/vr/processor/HumanSekeletonWithLegs.java +++ b/src/main/java/io/eiren/vr/processor/HumanSekeletonWithLegs.java @@ -116,8 +116,8 @@ public void setSkeletonConfig(String joint, float newLength) { case "Hips width": hipsWidth = newLength; server.config.setProperty("body.hipsWidth", hipsWidth); - leftHipNode.localTransform.setTranslation(hipsWidth / 2, 0, 0); - rightHipNode.localTransform.setTranslation(-hipsWidth / 2, 0, 0); + leftHipNode.localTransform.setTranslation(-hipsWidth / 2, 0, 0); + rightHipNode.localTransform.setTranslation(hipsWidth / 2, 0, 0); break; case "Hip length": hipsLength = newLength;