Sign in to follow this  

Keep moving after swipe

Recommended Posts


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 (

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.