Please answer these questions to help fix this issue:
What’s the issue?
use the cocos2d-x coordinate is too hard!
What’s the engine version?
all
How to reproduce it?
I want to know it!
can set the x=0,y=0 is top left??
just like flash
thank you!
why is it too hard?
Almost all game engine uses this coordinate system
@Wuhao
but I think the 0,0 is top left , and down is y+ , right is x+ is better easy.
just like flash.
can have some function?
Very simple:
- Get window height
- Subtract Y from height.
public static cocos2d::Point convertToFlashPoint( const cocos2d::Point & pPoint ) {
const cocos2d::Size & winSize = cocos2d::Director::getInstance() -> getWinSize();
return Point( pPoint.x, winSize.height - pPoint.y );
}