I’m using this perspective library, to make my game screen movable, so far its working well, the main actor is being followed around. But i don’t know how to make the the Parallax work.
Basically i want the Background Sky to always stay in the screen. And the mountains and threes to move.
This is how i’m adding them in to the camera:
camera:add(background, 8, false) -- SKY camera:add(montanhas, 7, false) -- Mountains camera:add(arvores, 6, false) -- Trees camera:add(floor,5, false) camera:add(hero, 1, true) - hero
The grey circles on the bottom of the image, are my HUD, i’m not adding them to the camera, so they just stay in the correct position.
Any help will be appreciated.