How to handle user touching the move forward button and jump button at the same time?

I have player control buttons that move a character forward, back, or jump based on what button is being touched.

I just realized if a player is touching the move forward button and then attempts to touch the jump button at the same time the jump button touch does not trigger anything as the move forward button is still in play.

Any idea on the best way to handle this?

Hi @sebfloapps,

Do you have multi-touch enabled? If not, then the screen will only receive (process) one touch at a time.

I can guide you on implementing multi-touch if you’re not familiar with it.

Best regards,

Brent

Hi Brent,

I dont think its enabled unless its enabled by default.

Would I just need to add the following line?

system.activate( "multitouch" )

Hi,

Yes, that is how to enable it. From there, though, you should study the following guide to understand how each touch is treated uniquely in your code:

https://docs.coronalabs.com/guide/events/touchMultitouch/index.html

Brent

Hi @sebfloapps,

Do you have multi-touch enabled? If not, then the screen will only receive (process) one touch at a time.

I can guide you on implementing multi-touch if you’re not familiar with it.

Best regards,

Brent

Hi Brent,

I dont think its enabled unless its enabled by default.

Would I just need to add the following line?

system.activate( "multitouch" )

Hi,

Yes, that is how to enable it. From there, though, you should study the following guide to understand how each touch is treated uniquely in your code:

https://docs.coronalabs.com/guide/events/touchMultitouch/index.html

Brent