Multiple touch screen event listener

hi all

is it possible manage more than one touch screen event listener in a jme3 app?

If so how to do that? any tips?



Aww, you bumped your post, now it wont be found by the “unanswered” filter, too bad :stuck_out_tongue:

And, although we are flattered that you expect answers this fast: Wtf, you didnt even wait a day???

1 Like

Uh … You can add more than one listener?

Ever tried InputManager.addListener(touchListener)?

1 Like

suppose i want to throw a touch event when my pointer touch a box .How could i do that?

Should i use AnalogListener or rawInputListener? how to bind it to my spatial box?

I reformulate my question:

I d like to manage a box touch event.How to bind box to listener?

That’s not what the purpose of the InputManager. You use InputManager to get events when inputs are invoked. Objects in the scene have no relevance to input and thus cannot be used for this purpose.

a box could be a button for an android app so if i touch that box i d like to throw an event.

GUI is not input

And if a nead an virtual button in the screen? A GUI such as a box n the screen could be an input no?

I believe you should have a touchListener, and then do a detection test to see what you touch at.

Since the box isn’t a GUI element you can’t add a listener directly to it.

i ve done a rawinputlistener i see if event touch coordinates are in box bound and then i manage it…that’s the only solution i found grazie