I want to set the position and direction of a camera to the position and direction of a transform node. Intended behaviour is that the camera will always be at the exact position and direction of the node when rendering:
init:
this.camera = new Camera("Camera", new Vector3(0, 0, 0), this.scene);
loop:
this.camera.position = node.position;
//this.camera.direction = node.direction;
this.scene.render();
I tried it with the position so far, but the view doesn’t change. I read that the usage of Camera is discouraged, but I don’t need all the behaviour of the other cameras.
That’s basically the setup. One Camera, one TransformNode. Set camera position to node position. After that, render the scene. The canvas doesn’t show the camera at the expected position, but at the origin.