shvalb Posted March 13, 2016 Share Posted March 13, 2016 Hi guys, I'm new to Phaser and I'm trying to setup the Kinetic scroller using the example on the Website (https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin) instead of horizontal scrolling I configured it to vertical and I put the code in my main state. The problem is when I scroll vertically it also scrolls the main background picture as well. How can I define a scrolling area that is not the entire screen? Here is my scrolling code: create: function() { //Starts the plugin this.game.kineticScrolling.start(); this.rectangles = []; var initY = 100; for (var i = 0; i < 26; i++) { this.rectangles.push(this.createRectangle(this.game.world.centerX-450/2 , initY, 450, 80)); initY += 90; } //Changing the world width this.game.world.setBounds(0, 0, this.rectangles.length, 320 * this.game.height); }, Any help would be appreciated! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts