In a project using absolute scale, I’m having an issue where when the user changes the orientation of a device, the position is reset to the floor. I’ve tried adding an event listener to reset the position when it detects a change in orientation but that doesn’t seem to work. Any advice as to what I can do?
I found something in the documentation about how with absolute scale, the X, Z and rotation are set normally but the Y position is set relative to the ground height. I also noticed when starting the build with the ground plane being visible, it starts considerably higher than I would expect.
Hello @Matthew_Gallagher I would suggest referencing our device oreintation example project here:
And start by console logging the oreintation to verify this is running correctly.
Can you share a screenshot of your absolute scale scene? In some cases the model may seem to be “floating” when it is actually just clipping through a wall (which gives this illusion). I would suggest testing the experience in a larger/open area to better undersatnd what could be going on. Please verify.
To add on, absolute scale works by dynamically setting the camera height of the a-camera
with the estimated height of the camera in the physical world. This is designed for things like furniture, where the 3D models themselves are exported at real-world scale.
If you make content visible before scale has been determined (i.e. before the coaching-overlay.hide
event), then the camera will use the height of the camera as defined in your body.html
.
Changing the device orientation will cause scale to be lost. If you want content to appear at the same size regardless of device orientation, the user will need to follow the coaching overlay to determine scale each time the device orientation is changed.
These are some screenshots of adding in the absolute scale items mentioned in the readme [here] to the orientation project listed in @Ian post. Once the project starts, the jellyfish is quite large (understandably due to the size and scale used in the project.) And once I rotated the device, got the “rotate your phone back” image prompt, and rotated my phone back to vertical, the jellyfish appeared much smaller. I moved it around using the xrextras-gesture-detector and it wasn’t a perspective issue. In addition, the shadow in both the before and after appeared to be in the real floor so I don’t think the ground was at an incorrect height. While this isn’t my original project, this does represent the same issue I am experiencing. (Absolute Scale | 8th Wall | 8th Wall)
Hello @Matthew_Gallagher
We have tested this use case and found that device orientation with abslute scale has a current bug. We have reported this with the internal team and will investigate.
For a current quick workaround, you can have some logic that shows a screen with a page reload button when a device orientation screen is registered.
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.