AnalogListener avoid multitouch event

Hi all

i have an analog listener in my android jme3 app.

The problem occurs when i touch the phone screen with two fingers.

Can AnalogListener filters it?

The problem is what?? Dilembo, you are spamming the forum with very samey posts that are not very specific. The frequency of the posts makes clear that you put few effort into solving the problem yourself the moment you encounter it but rather post in the forum directly. Please post only when you can describe the problem and what you tied to solve it otherwise they are just time-intensive spam.

1 Like

Suppose you have a rotation bind to onAnalog event (as u have shown me in the past)

when i touch the screen with two fingers the rotation start to flip.

anyway my post are for different matters

You have to use TouchListener and not AnalogListener if you want to use multitouch

if i use TouchListener the parameter value in void onAnalog corresponds to event.getX() in void onTouch?


public void onTouch(String binding, TouchEvent event, float tpf) {…



public void onAnalog(String binding, float value, float tpf){…


and what is the equivalent of

[java] @Override

public void simpleUpdate(float tpf) {



for touchlistener?


onAnalog() is invoked upon movement, in this case, movement of the mouse, which is emulated by the touchscreen on android. So any swipes you do on the screen will cause onAnalog() to be invoked on either the X or Y axis with value containing the delta.

so if i want rotate a spatial and with another finger touch a button what should i use? Both? the first for rotating and the second for the buttons?

If its a physical button then use key input, otherwise use touch input

i m not sure touchlistener can manage multi touch @Momoko_Fan

do you have any samples?

Ciao gio

It sends the events as-is from the Android OS. You obviously need to have a multitouch capable device

i have a multitouch capable device.

galaxy s is it .

i implemented TouchListner and analogListener.

So if i touch a back button and the screen only the back button is considered.

looks like they are exclusives.

TouchListener is just for button (phyisic button for what i tested)

I read that android has multitouch management only with OnTouchListener that looks different from jme3 TouchListener