Models don't stay on the ground

In the following code I attempt to have 50 models in a row.
Even though the height is set as 0 the farther down the line
the higher in the air the models are placed.
Apparently there is something I don't understand happening here.
How do I get all the models to be placed on the ground?

var viewer = new Cesium.Viewer('cesiumContainer', {
    infoBox : false,
    selectionIndicator : false,
    shadows : true
});

function createModel2(url, height,coord) {
    var position = Cesium.Cartesian3.fromDegrees(-123.0744619, coord, height);
    var heading = Cesium.Math.toRadians(135);
    var pitch = 0;
    var roll = 80.100;
    var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
    var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
    var entity = viewer.entities.add({
        name : url,
        position : position,
        orientation : orientation,
        model : {
            uri : url,
            minimumPixelSize : 128,
            maximumScale : 20000
        }
    });
    viewer.trackedEntity = entity;
}
var coord = 44.0503706;
var increment = 1;
var options = [{
    text : 'Aircraft',
    onselect : function() {
        for (var i = 1; i <= 50; ++i) {
        increment =Number((i / 2000000).toFixed(6));
        coord = coord + increment;
        createModel2('../../SampleData/models/ship/ship4.gltf', 0,coord);
        }}

}];

Sandcastle.addToolbarMenu(options);

Hi there,

I was unable to replicate your issue – your code looks perfect to me! Here’s your code running with the Cesium_Air model instead: http://localhost:8081/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=e11984c53dec8b81e24cab664fe43f24

They all look to be on the ground.

  • Rachel

Apparently it must be something about the model I was using. I will check into that. Thanks for pointing me in the right direction.