Hi,
I developed a project in Cesium JS. I can move the model with the arrow keys. Additionally, when the button is active (Focus on plane), I can constantly follow my moving plane (model) from a certain angle, as if a camera was attached to the wing of the plane and I am watching any part of the plane from the wing of the plane. I can also change the camera perspective from the top left bar. This way, when the plane moves, I move the camera and my perspective changes.
But I have a problem. When I move the plane with the arrow keys, I want to rotate the camera along with the plane, but I can’t. Currently, when I press the arrow keys, the plane turns, but the camera angle remains constant. Therefore, my camera perspective changes. My goal is to have the camera turn as the plane turns left, so that it always looks from the same place at the same target, for example from the wing to the fuselage, at the same angle. It’s as if the camera is mounted on a fixed place and only watches a certain place. For example, I want the camera to be mounted on the wing and always watch the fuselage from the wing unless I change the angle. How can I do that ?
Start screen ;
When I change the perspective from the bar ;
When I move the plane with the arrow keys. THE SITUATION I DON’T WANT: