Simple-WebXR-Unity icon indicating copy to clipboard operation
Simple-WebXR-Unity copied to clipboard

Regression. VR scale no longer matches Unity editor scale on Oculus Quest

Open ThePaperDragon opened this issue 3 years ago • 8 comments

I recently tried the latest version of your plugin, and found that the scale of the scene is now based on the height of the headset at player start. The camera in my editor scene is at a seated height. If I start the build when I am standing, scene scale is huge and I feel like a hobbit. If I start the scene when crouched, scene scale is tiny and I feel like a giant. It is very important to my use (showing clients models of real world exhibit spaces) to have the scale in VR match the scale in Unity. A previous version of your plug-in that I have used (dated Dec 3) did not have this issue.

ThePaperDragon avatar Mar 08 '21 19:03 ThePaperDragon

I'll try it with the last firmware of the Quest, I haven't done it yet. I only changed the starting position so that the world zero is at the level of the user's head. But the only way to change the scale of the scene is to resize the objects with the hands.

Rufus31415 avatar Mar 15 '21 05:03 Rufus31415

I took a tape measure and measured an object's height and it was clearly changing based on the headset's height when I click the "enter VR" button. I know you are striving for consistency across platforms and trying to make things as simple as possible, but I much prefer the Quest browser's origin at floor level. I have a script in my code that moves the whole scene down along Y if the camera starts at floor level on another platform.

ThePaperDragon avatar Mar 15 '21 14:03 ThePaperDragon

Ow really weird, I don't have this scale behavior on my Quest 1... For the start position, the variable SimpleWebXR.UserHeight contains the distance between the floor and your head. Would you be interested if I add a property to consider this height along Y at startup ?

Rufus31415 avatar Mar 16 '21 20:03 Rufus31415

I finally had some time to do more testing. My apologies. Scale was was not changing, just camera height. My method of measuring was flawed. It is impressive how camera height can alter your perception of the scale of things when you can't see your body. You assume the floor you are seeing in VR is the actual floor and your brain scales things accordingly. SimpleWebXR.UserHeight sounds promising, but when I output it to a text object in the update call it always seems to be zero in the Oculus browser. I would very much like a property to consider height along Y at startup. Having the unity camera at the real world headset height is critical to my application.

ThePaperDragon avatar Apr 16 '21 14:04 ThePaperDragon

ok, no problem.

What do you think of these additional properties?

You can choose which space to work in:

  • Viewer : The Y axis equals 0 at head level when session starts
  • LocalFloor : The Y axis equals 0 at floor level. local-floor is not supported an offset of FallbackUserHeight = 1.8 is applied

image image

Rufus31415 avatar Apr 16 '21 17:04 Rufus31415

That looks like a perfect solution. I look forward to trying it out. Thanks!

ThePaperDragon avatar Apr 16 '21 17:04 ThePaperDragon

Hi Rufus, I just tested out your latest version. The interface looks great, but it is still not working correctly in the Oculus browser on my Quest 1. If I set my Reference Space to "Local Floor" it is always using the Fallback User Height rather than the actual user height of the Oculus. I found a good way to test, is to set your guardian to stationary and move outside of it just enough that you can see the guardian's floor ring. In your December 3rd version of Simple Web XR the guardian floor is perfectly coplanar with my unity floor. Not so the latest version.

ThePaperDragon avatar May 03 '21 17:05 ThePaperDragon

Ok I should test with the same browser as you. I will try soon on a quest 1

Rufus31415 avatar May 06 '21 05:05 Rufus31415