Skip to content

Commit

Permalink
Fix hips switching place when changing hips width
Browse files Browse the repository at this point in the history
  • Loading branch information
Eirenliel committed Jul 5, 2021
1 parent 143cf49 commit 43bc140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/io/eiren/vr/bridge/NamedPipeVRBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void waitForPipesToOpen() {
initTrackerPipe(trackerPipe, i);
}
if(spawnOneTracker)
return;
break;
}
}

Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43bc140

Please sign in to comment.