WebXR Reference Spaces and Walking Around a Scene

Hi all,

I’m exploring WebXR and considering purchasing a Quest 2 for development. I have what feels like an obvious question but can’t find it explicitly stated in the BJS WebXR documentation. I understand that the api provides A) Teleportation, B) Controller Joystick Movement, and C) Walking in Place. However, can I just walk around a 10’x10’ scene with a Quest headset and the built-in tracking/play area?

–CLARIFICATION–

In BJS WebXRSessionManager we have:
const referenceSpace = sessionManager.setReferenceSpaceTypeAsync( /*referenceSpaceType = 'local-floor'*/ );

When selecting XRReferenceSpaceType in the docs the link for this type is broken 404. However, found this in the LibDeclarations:
type XRReferenceSpaceType = "viewer" | "local" | "local-floor" | "bounded-floor" | "unbounded";

After a bit of digging, I found this from WebXR. So it appears we can set the WebXR BJS experience to unbounded or bounded-floor to allow for the user to walk around their play area but could someone confirm this? I haven’t seen an example of a demo video, it seems like most people are keeping their projects at the default…

There are several types of reference spaces: viewer , local , local-floor , bounded-floor , and unbounded , each mapping to a type of XR experience an app may wish to build. A bounded experience (bounded-floor ) is one in which the user will move around their physical environment to fully interact, but will not need to travel beyond a fixed boundary defined by the XR hardware. An unbounded experience (unbounded ) is one in which a user is able to freely move around their physical environment and travel significant distances. A local experience is one which does not require the user to move around in space, and may be either a “seated” (local ) or “standing” (local-floor ) experience. Finally, the viewer reference space can be used for experiences that function without any tracking (such as those that use click-and-drag controls to look around) or in conjunction with another reference space to track head-locked objects. Examples of each of these types of experiences can be found in the detailed sections below.

cc @RaananW

local-floor should allow you to travel through the space as well. However, it is meant as a “standing” experience. The bounded will also provide you bounds, defined by the underlying system. The difference is mainly the data that is provided by the system itself - local floor will provide a ground at y = 0.
The guarding walls of the system itself should be displayed by the system itslef, whether you use local or bounded. Bounded will allow you as a dev to use the guarding area’s geometry - for example if you want to define a playing area based on what the xr user has defined.

Unbounded is a good candidate for an AR experience.

So the TL;dr is - every reference space will allow the user to move around. The camera’s transformation will change no matter that. The question is what information you need in order to generate your experience.
I am not sure if that answers your question though :slight_smile:

3 Likes

Yes, that makes total sense and answers my question. Thank you!

1 Like