I have a question about how I set floor level in project to real floor level. Now I put tablet on floor and launch AR project. Is this correct?
you can use a different reference space like local-floor if you want to achieve this. If you want to see why unbounded is recommended for AR you can read about it here - Geometry and reference spaces in WebXR - Web APIs | MDN, but you can still use other reference space types if this is what you need in your scenario
Thank you for reply.
Yes, as you said, local-floor is recommended for my object, so I create this project on local-floor first. However I couldn’t get my real camera position in local-floor because realWorldHeight return similar value(1.1~1.27 M) and floor in project was generated below real floor when initialize AR application. So I thought I have to set application floor level manually like HTC-Vive initial setting. For this feature, I change reference space to unbound but I will change reference space to other if other reference space is recommended.
the underlying system provides us with the floor height and sets the height of the floor to be 0. We don’t reset it or manipulate the numbers. so if you have any way of configuring the floor in the device you are working with - this should be the place to look for, if it is not correct. On Android OS, the OS itself makes an assumption as to what the floor height is, based on image processing and other input. In this case, just be sure that your floor is well textured (i.e. - not a flat single-colored surface)
In the result, I decided to use unbounded space because, in my environment, local-floor space could not get floor level. In my application, I put smartphone camera on real floor and set xr camera position y to 0. In this way, we can decide floor level in application flexibility and it don’t cause error like previous my reply.
Of course I will use local-floor space in usual development. Thank for your reply.
This is my playground.
Reset button reset xr camera position to 0 and put button put box on the floor in AR world.