Closed leinardi closed 13 years ago
Ok, solved: in the function ccTouchesMoved() you must handle an array of touch and not a single touch.
@Override
public boolean ccTouchesMoved(MotionEvent event) {
int pointCnt = event.getPointerCount();
for (int i = 0; i < pointCnt; i++) {
CGPoint location = CCDirector.sharedDirector().convertToGL(CGPoint.ccp(event.getX(i),event.getY(i)));
Log.d(TAG, String.format("move %d=(%f,%f)", i, location.x, location.y));
}
return super.ccTouchesMoved(event);
}
I can't get multi touch to work in ccTouchesMoved(). It works correctly in ccTouchesBegan(), but in ccTouchesMoved() I get only event from ActionIndex=0.
It's my fault or is it a bug?
This is the code of my Layer: