Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
s3xysteak opened this issue Sep 5, 2024 · 3 comments
Open

Comments

@s3xysteak
Copy link
Contributor

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

@ggetz
Copy link
Contributor

ggetz commented Sep 9, 2024

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.

@s3xysteak
Copy link
Contributor Author

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
Copy link
Contributor Author

s3xysteak commented Sep 9, 2024

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

Not sure what the difference is between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants