I have big map(width:150X32px,height:42*32px).
My sprite moves in that map and I wanted to follow it, but it should never go out of the map.
So I have some code like this:
CCSize s = map->getMapSize(); // 150,42
CCSize t = map->getTileSize(); // 32,32
CCSize u = CCDirector::sharedDirector()->getWinSize(); // screensize
CCSize v = CCDirector::sharedDirector()->getWinSizeInPixels(); // screensize in px
float zoom = u.width/v.width;
CCSize m = CCSize(s.width*t.width*zoom,s.height*t.height*zoom);
The camera follows correctly most time(like 90 width and 90 height), there is still part of the map is not reachable.
It works fine in Windows, but this issue does happen in my note 2.
I have searched for this question yet no luck.
Please someone kindly help.
Tried getScale also, no luck.
It seems the scale I get is not exactly the one used by engine.
Nevermind, I figured it out.