processing / processing-android

Processing mode and core library to create Android apps with Processing
http://android.processing.org
781 stars 293 forks source link

Multitouch: Identify current touch pointer not possible? #617

Open ProcWorld opened 3 years ago

ProcWorld commented 3 years ago

In the PApplet implementation (enqueueTouchEvent) the current pointer id is set with this: touchPointerId = event.getPointerId(0); But I think it must be taken from the action like this: touchPointerId = event.getPointerId((e.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT); Otherwise the id is taken always from the first pointer index that is not ensured to be the recent pointer.

ranaaditya commented 3 years ago

@ProcWorld I hope this article by Google Engineer will help you !