2

I am making a 2D platform game (like Mario). I move the SKCamera to left and right with 2 buttons (left and right). The x and y coordinates of the 'Mario-spite' is the same a the x and y coordinates of the SKCamera. I move the SKCamera and also the 'Mario-spite' with 2 px. How can I make a parallax effect (with 2 or more background layers/nodes) at the moment I press the left-button or the -right button. I am using SKTilemaps. The answers on Stackoverflow is not what I am looking for.

Johan Kornet
  • 103
  • 11
  • do you know how to do the background / paralaxing, and the issue is that you don't know how to string it up to the left / right button? – Fluidity Aug 28 '17 at 15:58
  • Both, I have the parallax working but when I stop pressing the left or right button, than de camera (and Mario-sprite) stops, but the background keep moving. – Johan Kornet Aug 28 '17 at 18:22
  • This happens when the camera hits a wall or something, then the camera stops but the background keeps moving. – Johan Kornet Aug 28 '17 at 18:23
  • can you post your relevant code? – Fluidity Aug 29 '17 at 00:39

0 Answers0