Skip to content

Commit

Permalink
Changed to 2.6mtrs.
Browse files Browse the repository at this point in the history
  • Loading branch information
SrinivasPrabhu794 committed Feb 21, 2021
1 parent 5ecc680 commit 119594f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/xr/src/use-interactions-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ const useInteractionsManager = ({
let worldScale = useStoreApi.getState().worldScale
let hmd = camera.parent
let elevationDisplacement = 0.5
//Value of -1.6 is used since the XR camera is already 1.6 mtrs above the ground by default.
let minHeight = -1.6;
//Value of -2.6 is used since the XR camera is already 1.6 mtrs above the ground by default.
let minHeight = -2.6;

if (event.target.uuid === rightController.uuid) {
hmd.position.y += elevationDisplacement
Expand All @@ -774,7 +774,7 @@ const useInteractionsManager = ({
//This makes sure that the camera moves upto 1mtr below the surface
if (hmd.position.y > minHeight) {
hmd.position.y -= elevationDisplacement
//Clamp the value to 1.6mtrs below the ground in case the y values becomes lesser.
//Clamp the value to 2.6mtrs below the ground in case the y values becomes lesser.
if(hmd.position.y < minHeight)
hmd.position.y = minHeight
}
Expand Down

0 comments on commit 119594f

Please sign in to comment.