I set a new scroll position and zoom level of a camera in scene.update() method. I need to find out where the camera view is exactly looking before the scene is render.
I tried to use camera.getWorldPoint(), but this does not return correct values (it ignores the new zoom level). I also tried to use camera.worldView, but this property is updated in the camera preRender step and I can’t find out how to call my own method after the camera preRender step and before the scene is rendered.
The World View is a Rectangle that defines the area of the ‘world’ the Camera is currently looking at. This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. You can use it for culling or intersection checks.
Yes, I did. The problem is worldView is updated in the camera preRender method and I don’t know how to call my own method after the camera preRender() but before the scene is rendered.