Fixing the GLTF model w.r.t ground


When I am overlaying the GTLF model using the following code, the model is loaded however its position with respect to ground is not fixed and keeps on changing when we zoom-in or zoom-out. please suggest where I am doing wrong.

//B27 version being used

var rotateX = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(0)), Cesium.Cartesian3.ZERO);

var modelMatrix = Cesium.Matrix4.multiply(Cesium.Transforms.eastNorthUpToFixedFrame(ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(val[1],val[0],0))), rotateX);

var model = scene.primitives.add(Cesium.Model.fromGltf({

url : ‘models/1.json’,

modelMatrix : modelMatrix,

scale : 1.0


//val[1] and val[0] are the longitude and latitude values


I would not expect that. Have you tried the 3D model example in Sandcastle? Do those models appear to move? Perhaps that example can provide some insight.



yes. I tried to overlay “rambler” model given in the gallery folder of gltf branch. This also appears to move in my viewer.

However the same rambler model (and also my model) appears to be ok in the default gltf branch viewer


Should i need to switch over to B29 to resolve this?



I migrated my application to B29. the models are working fine. I don’t know what was the problem with previous version codes.