This is my first message here, cesium is super cool, congratulations to everybody.
I am trying to use google3d tiles and cesium for a browser game research project. I have entities that move around according to server signals and keep the camera on one item via trackedEntity. This all works pretty good. But I ran into a few issues that I can’t resolve myself and can’t find solutions.
a.) I noticed that a strange filled colored plane that would occur in certain scenarios.
I know now that is the cesium.globe and when i disable the property it goes away. But then I don’t have blue sky anymore;) Using
terrain: Cesium.Terrain.fromWorldTerrain()
reduces the effect but it’s still very much visible.
Why does it show anyways? How can I show the sky without the globe? I hope this makes sense. Below is my viewer init.
const viewer = new Cesium.Viewer('cesiumContainer', { imageryProvider: false, baseLayerPicker: false, requestRenderMode : true, shouldAnimate: true, timeline: false, animation: false, terrain: Cesium.Terrain.fromWorldTerrain(), }); viewer.scene.primitives.add(await Cesium.Cesium3DTileset.fromUrl( "https://tile.googleapis.com/v1/3dtiles/root.json?key=KEY" ));
b.) This is not specific google3d concern. I am using the velocity orientation property to manage the orientation of the model. Works great. What I don’t understand is how i can keep the camera fixed on the model as well. Say I want the camera on the back always, how can I use the orientation to achieve that?
var transform = Cesium.Transforms.eastNorthUpToFixedFrame(position); viewer.scene.camera.lookAtTransform(transform, new Cesium.HeadingPitchRange(0, -Math.PI/4, 100));
I am using this to fix the camera but I don’t understand how I feed to orientation of my model into the camera. I think it might be simple, famous last words.
Best and thanks a lot,
Stan