I want to let earth rotate ,but not use to rotate camera

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

I want to let earth rotate.if I rotate camera , skyBox will rotate ,I hope skyBox is static,only rotate earth

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

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

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

So here’s what I’ve just discovered - the earth is always rotating! It’s just that the camera is also rotating with it (I guess that’s why it took us so long to discover it rotated in the first place).

To see it move, you’ll have to transform the camera to a fixed position every frame. So something like:

var icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);

if (Cesium.defined(icrfToFixed)) {

var camera = viewer.camera;

var offset = Cesium.Cartesian3.clone(camera.position);

var transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);

camera.lookAtTransform(transform, offset);



Here’s a full Sandcastle example.

1 Like


Thanks omar!

That was very helpful to me.

For beginners: just copy and paste the JavaScript code in your *.czml file!