Multitouch problem

hi all

try to understand how to filter more than one touch event on my phone screen.

i used a raw input listener , a touchListener , an analog listener added to inputManager and i touch the screen with two finger.

i ve done a rotation linked to touch event.My rotation start to flip when i touch the screen with two fingers.

How to filters it?

i try with collision but that’s not helped me.

[java]Vector3f origin = getCamera().getWorldCoordinates(

getInputManager().getCursorPosition() , 0f);

Vector3f direction = getCamera().getWorldCoordinates(

getInputManager().getCursorPosition(), 0.3f);


Ray ray = new Ray(origin, direction);

CollisionResults results = new CollisionResults();

int number = sphere.collideWith(ray, results);

int number2 = sphere2.collideWith(ray, results);


number1 and number2 are (2,0) or (0,2) although i touch both sphere in the screen!

I used also


boolean t1=results.getClosestCollision().getGeometry().getName().equals(“myspherename”)

boolean t2=results.getClosestCollision().getGeometry().getName().equals(“myspherename2”)


t1 and t2 are true,false false,true although i touch both sphere in the screen!

CollisionResults always give me one collision ! It has to be something wrong !