Skip to content

Commit

Permalink
Changed elevation displacement to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Stepura committed Nov 6, 2019
1 parent e0c55bc commit 984d2f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/xr/src/use-interactions-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,13 @@ const useInteractionsManager = ({
let rightController = getControllerByName(controllers, "right");
let worldScale = useStoreApi.getState().worldScale
let hmd = camera.parent
let elevationDisplacement = 0.5
if(event.target.uuid === rightController.uuid) {
hmd.position.y += 1
hmd.position.y += elevationDisplacement
}
else {
if(hmd.position.y !== 0)
hmd.position.y -= 1
hmd.position.y -= elevationDisplacement
}
teleport(camera, (hmd.position.x + camera.position.x) * worldScale, hmd.position.y * worldScale, (hmd.position.z + camera.position.z) * worldScale)
}
Expand Down

0 comments on commit 984d2f0

Please sign in to comment.