Replies: 2 comments
-
This is actually expected behavior. Doing true 3D occlusion is not very feasible with 2D DOM content, especially not in a performant way. The only way that we do occlusion is by hiding the hotspot when its normal vector points away from the camera, which is simple and fast, but is less than perfect on non-convex models. This is also why we don't hide hotspots completely by default. Our system has the side benefit of being more accessible, since the hotspots retain their full clickable area even when partially occluded. |
Beta Was this translation helpful? Give feedback.
-
Thanks for explaining. The behaviour makes sense now and is consistent with how you are describing it's expected to work. |
Beta Was this translation helpful? Give feedback.
-
Description
Expected behaviour: Hotspots change to hidden when a solid part of the model blocks the line of sight from the camera to the hotspot
Actual behaviour: Sometimes hotspots remain visible despite a solid part of the model blocking the view of the part of the model where the hotspot is located.
The behaviour seems to vary between models and the direction of view. Simpler models e.g. one large hill generally seem to work better than more complex ones. There's no difference in the way the models are generated, just the complexity of the shape.
Steps to Replicate:
Live Demo
https://glitch.com/~hotspots-not-hidden
Version
https://unpkg.com/@google/[email protected]/dist/model-viewer.min.js
Browser Affected
OS
Beta Was this translation helpful? Give feedback.
All reactions