Tracked entity not centered to my 3D model

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

When I use tracked entity of modified 3D aircraft model, the camera doesn’t look exacty towards the center of the entity.

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

viewer.trackedEntity = entity;

I uploaded a modified model that you can use to see the problem.

This example of the SandCastle is a good example to the probleme with my model :

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

I need to use Cesium.HeadingPitchRoll on aircraft models. According the documentation, the modeles have to be X axis orientated.

I found these aircraft models (https://github.com/kalmykov/fr24-3d-models). As they are all Y axis orientated, I had to edit them to apply a 90° rotation so that they become X axis orientated. I succeeded to do that with Blender, by importing .dae files, rotating models, exporting models in .dae with the option X axis orientated and converting the .dae in .glb with collada2glb-bin.exe.

With the orginal models, I can zoom towards the tracked entities and I can see the target is the origin the model (perfectly centered).

With my modified models, if I zoom toward the tracked entities, I can see the target is a point that is in the fuselage but slighty to the left of the origin !

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

CESIUM 1.57, Windows 7 , Chrome

Thank you

e170_ok_6.glb (1.4 MB)

Can you host the original model and the rotated model on Cesium ion (https://cesium.com/ion/) and send me a link to each? (You’ll find a “Open complete Sandcastle example” button under the asset preview for each model).

One easy way to switch the orientation of the model without having to manually edit it in Blender is to edit the glTF JSON to add a new root node with the orientation matrix given here: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CHANGES.md#breaking-changes-mega-7

Thank you for your answer.

  • I uploaded the original .glb model on Cesium Ion and I get the following error :

e170_old.glb (2.45 MB)

e170_ok_6.glb (1.4 MB)

Hello. I am noticing this problem as well. It can be seen in all the CZML Model Sandcastle examples. For example: https://sandcastle.cesium.com/?src=CZML%20Model.html&label=CZML

image

Is there any way to center the selected region (and thus the origin of all camera rotations) with the origin of the GLTF model?

Thanks for the help!