Forum Discussion
ayyteeee
2 years agoHonored Guest
WebXR: Requesting boundsGeometry for play space returns empty array or a small square
I'm testing a game using the default browser with my Meta Quest 3. I want use https://developer.mozilla.org/en-US/docs/Web/API/XRBoundedReferenceSpace/boundsGeometry to determine the size and shape of the user's play area so I can adjust the game to fit that space. However, if I try
session
.requestReferenceSpace('bounded-floor')
.then((refSpace) => { console.log(refSpace.boundsGeometry); });
then it prints an empty array to the console (viewed remotely with Chrome devtools). If I call console.log(refSpace.boundsGeometry) a second time after session.requestAnimationFrame has been called a few times then an array with 4 points is printed to the console. These 4 points form a square that is much smaller than my place space and are partially outside of the play space too.
I tested out this example https://ivnnv.github.io/webxr-samples/room-scale.html and it seems to have the same issue.
Does anyone know what I might be doing wrong? Or is this an issue with the Meta Quest 3 browser?
1 Reply
- ayyteeeeHonored Guest
Now suddenly I do get a boundsGeometry that fits my place space (though annoyingly it's still only 4 points rather than something more accurate). I'm not sure why it suddenly has started working. My guess is that I had two different locations I'd use my headset in and switching between them would cause the webxr API to behave incorrectly.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 3 months ago