Inateno/Dreamengine

Camera worldPos / renderPos

Inateno opened this issue · 0 comments

Actually, the Camera must be moved with the opposite value compared to what we want to do (x += 10 will display as a -10).

This is because the Camera is a PIXI.Container that contains the scene.
To avoid this, the best option is to do a custom x/y getter/setter and do the negative operation inside.

The second point is the renderPosition.
If we want to be able to do stuff like "split-screen" the camera must be delimited visually and the camera.x / y will change the position of the camera inside the render.
At this moment we will need to apply a worldPos.x / y that will be an offset applied to the scene the camera is looking at.