I’m using single touch event listener class ‘cocos2d::EventListenerTouchOneByOne’,
which is expected to force SINGLE_TOUCH, but exactly are not, where only on Android.
Running following, results are not same between on Android and on iOS. (Android’s somehow seems to catch multiple touchIDs.)
cocos2d::EventListenerTouchOneByOne::create();
auto listener = cocos2d::EventListenerTouchOneByOne::create();
listener->setSwallowTouches(true);
listener->onTouchBegan = [this](cocos2d::Touch* touch, cocos2d::Event* event){
// decline secondary touchID
if(touch->getID()>0){
return false;
}
//do some work
}
Is this the right specification of Cocos2d-x?
or the bug?
Please let me know.
version : cocos2d-x 3.2