I have a moving camera which stops at some point (changes depending on the scenario) and then a 3d model is added to the center of the scene for few seconds. I want this 3d model to face my camera. Now the problem is that i don’t know in which directions the camera will be looking at when it stops, therefore I can’t hard code the model matrix of the 3d object. How can i calculate the model matrix so that my 3d model faces my camera whenever its added to the scene?
I am using this code:
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(cartesian3);
var model = scene.primitives.add(Cesium.Model.fromGltf({
url : '../../Models/xyz.gltf',
modelMatrix : modelMatrix
}));
``