C_S Posted August 13, 2017 Share Posted August 13, 2017 Hi I want the player to initiate movement to left or right after a swipe. This movement should continue until the next time the screen is touched. I need quite specific information on how to implement this because although Phaser is easy to learn and documentation is good, I seem to be a slow learner and have not been able to make use of several forum entries and even tutorials on this topic. This is why I chose to use the swipe.js plug-in by flogvit (https://github.com/flogvit/phaser-swipe). Using this plug-in, I am only able to either "teleport" the player to the end coordinates instantaneously or - when I set player velocity - move it an all too tiny bit into the desired direction. I tried to have a tween executed but this didn't work out - is my command wrong or did I place it badly - or both? case this.swipe.DIRECTION_LEFT: game.add.tween(player).to({player.body.x: 50}, 500, Phaser.Easing.Linear.None, true);) I am absolutely fine with using neither tween nor the plug-in. Any specific (I need to see actual code) help is greatly appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts