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

Setting HeightReference to None on 3D Models doesn't update the 3D Model position #12080

Open
stewienj opened this issue Jul 12, 2024 · 1 comment

Comments

@stewienj
Copy link

stewienj commented Jul 12, 2024

What happened?

The height reference on entity models starts out as undefined. With this setting the height is absolute. If you set ground clamping as follows:
entity.model.heightReference = Cesium.HeightReference.CLAMP_TO_GROUND;
Then as expected the entity will sit on the ground. If you then set the height reference to NONE or undefined, then the entity still retains the CLAMP_TO_GROUND setting until you change another property on the Entity.

I tried this on billboards. Billboards work fine with setting the HeightReference to NONE, indicating this issue might be in just the 3D Model code.

Reproduction steps

  1. Run the sandcastle example below
  2. On the combo box select "Clamp to ground", and note the truck drops to the ground
  3. On the combo box select "No Clamping" and note the truck stays on the ground
  4. If you turn on "Track entity" and repeat steps 2 and 3 above the camera will move, but the 3D model will not move.

Sandcastle example

Example

Environment

Browser: Edge version 126.0.2592.87
CesiumJS Version: 1.119
Operating System: Windows 10 22H2

@ggetz
Copy link
Contributor

ggetz commented Jul 16, 2024

Thanks @stewienj, I can also reproduce. I agree that this is isolated to model entities, likely in ModelVisualizer.js.

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