Hi,
I’m having a touch event discrepancy. The API is giving me a Y coordinate as if 0,0 was the TOP LEFT corner instead of BOTTOM LEFT.
auto listener = EventListenerTouchOneByOne::create();
listener->setSwallowTouches(true);
listener->onTouchBegan = [=](Touch* touch, Event* event) {
Node *n = this->getChildByTag(1);
Point loc = touch->getLocationInView();
CCLOG("X,Y: %f,%f",loc.x + origin.x, loc.y + origin.y);
return true;
};
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);
The CCLOG output will show higher Y numbers as I get close to the bottom (LANDSCAPE) of the scene, and smaller numbers as the touch gets closer to the top edge of the screen in landscape mode.
Am I missing some configuration?