cesium icon indicating copy to clipboard operation
cesium copied to clipboard

HeightReference.CLAMP_TO_GROUND cannot clamp Entity.label to 3d tile

Open s3xysteak opened this issue 1 year ago • 3 comments

What happened?

viewer.entities.add({
  position,
  label: {
    text: 'Hello',
    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  }
})

HeightReference.CLAMP_TO_GROUND cannot clamp the label to 3d tile.

Reproduction steps

Open the sandcastle example, waiting for the loading, then you can clearly see the label clamp to the earth instead of the 3d tile

Sandcastle example

https://sandcastle.cesium.com/#c=dZJvb9owEMa/ipU3DVLqkKQOgaVoFZXWSt2YOrZXkSrjHGDNsSPbQNnU7z7nDxVszG+se+6eu99ZZkoai3Yc9qDRLZKwRzMwfFvhH63mFx5r45mSlnIJuvAGHwpZSNY6LRdgwDor3VNuj+buSu4XXRqvtKoelbwzLngs/Sgmo2TU9OkmY8NAAq41r7jlOzCYlqXf9+7G9YUrcVio80wHwqi2aq1pveHM0Rw5TtQWohFcikr/ZNV3MfGvI3dIOsZZTLKMREMSB+iaZISMhzEeJXFKsigdByiO05gQgm/Sm/FoGMdRMmhwOhhwBD0wSOtW6jf6XUiEamWcouTkIqRV/0U81vinu2Kh5JrbbQkBOtep7eXhYBA0gwVdgpigFgIhC692gq4eQAh1FXTaBvh6Y59hBRokg3fCh3Mdz57uPn99WcxfPj3Pv3+5b91vhXxrXsALvNzYg4Bp1xOhj7yqlbZoq4WPcWihqh0cmHC5ZT/d52DGNMamNA9PrXnJd4iXtxf+IGKCGuMyq60Q3/gvKLxpHrr6f6xC0ZLL9XwHWtBDU7aJpk+diDHOQxdedlqlxJLqvzr/AQ

Environment

Browser: Edge v128.0.2739.42 CesiumJS Version: 1.121 Operating System: Windows 10

s3xysteak avatar Sep 05 '24 09:09 s3xysteak

Hi @syzdev, you'll need to set the enableCollision option to true.

However, even when I do that, there seems to be an issue with this particular tileset.

ggetz avatar Sep 09 '24 13:09 ggetz

It also happened to a tileset my coworker gave to me, because it belongs to the company so I can't show it publicly.

I found that issue then randomly found a tileset in official sandcastle to test. So I think that may not only happen to this particular tileset in the sandcastle.

s3xysteak avatar Sep 09 '24 13:09 s3xysteak

Note that some tiles are correct, here is a sandcastle reproduction.

Not sure what the difference is between them.

s3xysteak avatar Sep 09 '24 13:09 s3xysteak