I just switched to cocos2d-x 2 for a new project so i took the one from git.
I was wondering, when I place a sprite at the screen like 0,0 it is at the bottom corner ?
Origin was top left right?
But when i log the ccTouch it is correct, 0,0 is at top left, but my sprite is at bottom left.
Is this a bug?
I mean the origin of the view is top left of the screen.
so X = 0 and Y = 0 then it is top left of the screen.
And when I log my touches they print the correct position.
Top is 0 and bottom is 480.
But my sprite draw inversed. So when i change position of sprite to 0,480 it is drawed at the top of the screen instead of the bottom. =/
TY ! Damn how could i be so stupid .
I just did pTouch->getLocationInView()
instead of CCDirector::sharedDirector()->convertToGL(pTouch->getLocationInView());