Hey guys, I’m stuck again. I have added @Bjorn_Ritzl’s custom render script to lock my aspect ratio regardless of the window size. Worked! Then I added a camera to my scene and positioned it: This should be the eye- & look_at position of this camera.
Here’s my project setup
Unfortunately the origin of the render view and the origin of the camera are both at lower left corner of the window. I need a way to change camera’s pivot point on which it centers itself. The fallowing sketch shows a red rect, which is the current window position when running the game. I need the yellow option!
I know I could change
render.set_projection(vmath.matrix4_orthographic()) inside my render script, BUT I think there is also another way, since the
@render: listens for a message
"set_view_projection" which should set a matrix center for the current viewport…
I try to create my own look_at_matrix and send it to the render script, whenever I want to change camera’s pivot point.
Unfortunately this seems not to work. Here is what my CameraController script does: