Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by andregarzia

Hi guys,

I see most of the impact games using something similar to a gamepad using the touchbutton plugin. For the game I am building, it would be better to be able to send touch events or something similar directly to an entity. If we think of a game like a match 3 game where the player clicks game pieces then we can all agree that from a player point of view, interacting directly with the piece is better than interacting with a virtual gamepad controller.

I failed to find documentation on how to handle taps on entities. I see a lot about mouse and keyboard input but I need touch input, can someone point me in the correct direction?

What is the best strategy to handle touch input directly on entities?

thanks for all the help
andre

1 decade ago by Joncom

You're going to have to capture the click-event, and do something with it. Chances are you will loop through all entities which you consider "clickable", check if the click-event happened within the entity bounding-box, and if so, then you know the entity was clicked and something should happen to it.

Some information on how to do that here.

1 decade ago by andregarzia

Thank you Joncom,

I was afraid this was the only way. :-)

I will try to wrap this into a plugin if there is no other way, then other developers may benefit.
Page 1 of 1
« first « previous next › last »