Different reference frame axis directions than shown in tutorial

Hi, I’m currently working through the following tutorial: http://cesiumjs.org/2014/03/03/Cesium-3D-Models-Tutorial/

When it shows the reference frame on the truck sample, the red axis extends towards the right, the green towards the front and the blue axis upwards, as I would expect.

However, when I attempt to use the default models using the Sandcastle, they appear with the red axis towards the front, the green to the left and the blue axis upwards (for some reason, whenever I attempt to screenshot the image the axes disappear).

The issue is that when I attempt to use the 3D model sample to rotate my own model files, that it appears that the rotation of the model is incorrect (e.g. it rolls when changing the pitch variable).

I suspect this might be the cause of the issue as when using my own files created using the glTF converter, it shows the reference frame like shown in the picture in the tutorial, but not when using the default models (as described above).

Could anyone clarify what is the correct behavior and whether I have to modify my COLLADA files to change the axes around?


The image from the tutorial is out of date. I’ll update it to avoid confusion in the future. Models should be aligned with the x axis, so the red axis should be coming out of the front of the model. Pitch is a rotation about the y (green) axis and roll is a rotation about the x (red) axis. I think the best solution is to re-orient your COLLADA model.



Thanks, I guess I’ll end up reorienting the COLLADA files that I have.

Hi Hannah,

I am a little confused here.
We have a model with the green axis coming out of the front. When we move the model we set the orientation using Cesium.Transforms.headingPitchRollQuaternion(). The model behaves as expected; if it moves with a heading of 90 degrees it goes east.

On the other hand, in the “3D Models” sandcastle, the aircraft points south when I set it to a 90 degree heading.

Documentation of headingPitchRollQuaternion(): Heading is the rotation from the local north direction where a positive angle is increasing eastward.

Thanks, Willem

Thanks Willem. You make a very good point. I would think north should be forward too, but it looks like we’re using east. I’ll have to ask someone about that.


Hi Hannah,
Thanks, it would be good to have this clarified, so we know if COLLADA models need to be adjusted or not.

I have an update:

So here are the way models should be oriented based on the value of the up axis in the Collada model.

Right: Negative y
Up: Positive x
In: Positive z

Right: Positive x
Up: Positive y
In: Positive z

Right: Positive x
Up: Positive z
In: Negative y

I’m still waiting to hear back about whether or not there’s a problem with our heading/pitch/roll orientation.


Hi Hannah,

Do you have an update on the model orientation,and moving a model in the right direction with headingPitchRollQuaternion() ?

I am also not sure what you mean with the Right/Up/In directions you mentioned in your last post:

The Cesium .dea models for Air and Ground have Y_UP for the up_axis.

The directions of the axis I see in Cesium (viewerCesiumInspectorMixin) are: Red (X-axis) through the front of the model, Green (Y) through the left, and Blue (Z) upwards. When positioned with heading=0, the front points to the east.

So e.g. the “Right: Positive x” orientation does not seem to match the shown Red (X-axis) through the front of the model.

Thanks, Willem

Hello Willem,

I just asked again, I’ll let you know when I hear an answer.