Skip to content

Camera worldPos / renderPos #22

@Inateno

Description

@Inateno

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions