how to change gltf default orientation

I use VelocityOrientationProperty to change the orientation of my model(gltf) entity when it is flying. I find that my model orientation is 90 degrees from its velocity orientation. But in cesium flying demo(Cesium_Air.gltf), the orientation is correct.
I also find that if i add my gltf without VelocityOrientationProperty, it faces north. But the Cesium_Air.gltf faces east by default. How to change the default orientation of gltf?

Hi there,

You could try to modify the glTF itself so the correct axis is forward, or you could try setting the model’s nodeTransformations to rotate it.

Thanks,

Gabby

Hi Gabby,

In the post above you stated “you could try to modify the glTF itself so the correct axis is forward, or you could try setting the model’s nodeTransformations to rotate it”. Could you elaborate? I have a set of models that were provided to me in .OBJ format. I’ve used the online converter to convert them to glTF v2 format. But they are not oriented as expected. These same models (in .OBJ format) are used in an application built on top of WorldWind, and we’d really like to be able to use the exact same models in Cesium.

If there is something I can do to modify the glTF files or if I could understand how to “set the model’s nodeTransformations to rotate it” that would be great! Could you provide a quick example of each?

Thanks,

Rob

1 Like