I have the sandbox here to explain the issue.
Our use case is that users can place billboards on their 3d tileset and they can also toggle the 3d tileset on and off. We would also have the terrain data turned off when 3d tileset is on, we think it would improve the performance since we won’t need the terrain data if we have the 3d tileset.
As the sandbox shows, the first time it loads, the billboards are correctly placed on the 3d tileset (with
HeightReference.NONE and getting the position using
If you click the toggle button, the billboards are also properly placed on the ground (since it’s using HeightReference.CLAMP_TO_GROUND and terrain is using the world terrain).
If you click the toggle button again to show the 3d tileset, for some reason the billboards are now on the ground but the labels are stuck at the 3d tileset. This is the unexpected behavior that I was asking for help about.
To elaborate, it was fine for one single frame, then this screen happens the moment you pan/tilt the camera. Here’s a gif.
Subsequent toggles would have the same result.
It’s worth nothing that in the code, I’ve always recreated the billboards whenever toggling the button, to avoid any state that might have stuck in between toggling actions, though I did try setting the entity.billboard.heightReference manually when toggling, but it’s the same.
Please try it out yourself by toggling the button a few times to see if it has the same result or not.
It seems to me that it is a bug, but if there’s anything else I could improve in terms of the implementation, let me know. Thank you!