Ninjadoodle Posted September 18, 2014 Share Posted September 18, 2014 Hi guys I've just started playing with the camera in Panda and its awesome! Has anybody got any ideas whether it's possible to do parallax scrolling or how it should be approached if a workaround is needed. I have some really long-winded ideas, but trying to see if there might be an easier option. Thank you heaps in advance!! Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted September 22, 2014 Author Share Posted September 22, 2014 Ok, here is what I've come up with ... Let's say you're making a horizontal scroller. Make two containers -> bg and fg, then attach you camera to fg and make it follow a sprite in the same container. Then, inside the update function ... update: function() { this._super(); bg.x = fg.x * 0.75;},This makes the background layer scroll at 75% speed of the foreground layer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.