Origin for Model Rotation?

1. A concise explanation of the problem you're experiencing.

I find that when I apply an orientation to an entity, the 3D model is rotated around a point which is not the origin of the 3D model.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

I modded the 3D Model sandcastle example to rotate the aircraft model around the roll axis. Here you can see that the aircraft is rolling around a point above the wings. However, the origin of the model is below the wing; so it is not rotating around the origin.

If you upload the Cesium_Air.glb here, and activate the RenderGrid, you can see that the model origin is below the wing.


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

Creating a flight simulation; need the model to rotate around its center of gravity.

4. The Cesium version you're using, your operating system and browser.

Latest as of today, Chrome browser.


So it turns out it was an issue of the camera itself moving when tracking the entity, not that the entity wasn’t rotating about the origin. For anyone who stumbles on this, here’s a GitHub issue with the full details: