Jump to content

Mobile screen touch controls


Recommended Posts


I would like to know if it is possible to have screen touch controls on mobile instead of the buttons?

In my game i tried having buttons to jump and it functioned correctly... however I am looking for a way to make my character jump wherever we actually touch  the screen and not just one specific button.

is that possible?


Also is it possible to have movement controls such as the attached in Phaser? is this a good example: https://phaser.io/examples/v2/input/virtual-gamecontroller


Thank you!


Link to comment
Share on other sites


you can use the


to use the screen as a button - I used it in one of my original games 


I made so you can press a mouse button on the screen (mobile use) or you can press the up cursor on a computer to jump

sample code

if (this.cursors.up.isDown || this.game.input.activePointer.isDown){
	} else if (this.cursors.up.isUp || this.game.input.activePointer.isUp){
		this.isJumping = false;

Hope that helps


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...