You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model should be placed where expected in WebXR #271
Currently, we rely on the model correctly setting its origin to (0, 0, 0) and assuming that is the floor surface -- if you've looked at the scale and origin of any model found across the internet, you'll know that models are often not positioned with these caveats. There's also the issue of models not using 1 unit == 1m, but less assumptions we can make there and a separate issue.
If we center the model on X/Z according to its bounding box, and set its lowest point on the Y as its floor, this will give the desired result for most use cases, I think. The exceptions are things that should appear floating, or models that should have things 'underground' (e.g. vines hanging over a ledge), or using the models position to bake an off-center pose.
In the future, probably something that should be configurable (use volume to determine center/ground, or use model's origin), but applying this logic in AR would match the framing logic in 2D mode, and what's desired most of the time IMO, and fix the issue of placing something in AR, and it appearing like it doesn't work because the model is 2 meters off screen from the hit.
IIRC, the current placement logic was influenced by ideas of composing multiple models which complicates this, which doesn't apply to the current component.
Activity
elalish commentedon Mar 10, 2020
This was fixed when we redid framing and introduced camera-target.