2D locking player at center of screen - problem with "layers" [SOLVED]
in
Programming Questions
•
6 months ago
Inside this game I'm working on I maneged to make my player locked at the center of the screen, while scrolling the scene by doing like the following post:
https://forum.processing.org/topic/2d-moving-objects-chasing-by-camera
but here's the problem. Inside my draw() method i use the following "render" order:
render bg
render tileset layer0
render tileset layer1
render player
render tileset layer2
render fg
render GUI
The problem is, once I pop the matrix, the other "layers" (tileser layer2 and fg) will naturally lock'emself with the camera.
Does anyone have any idea how to avoid it?
Thanks in advance!
https://forum.processing.org/topic/2d-moving-objects-chasing-by-camera
but here's the problem. Inside my draw() method i use the following "render" order:
render bg
render tileset layer0
render tileset layer1
render player
render tileset layer2
render fg
render GUI
The problem is, once I pop the matrix, the other "layers" (tileser layer2 and fg) will naturally lock'emself with the camera.
Does anyone have any idea how to avoid it?
Thanks in advance!
1