I've lost in tonnes of information for box2d and it's ports. But I have very simple question, for which I can't get any informations anywhere.
How to properly calculate body position. Let say I have sprite on screen in position (10, 20). Why every tutorial for box2d computing this different ?
For example: - processing (from processing.org) using function coordPixelToWorld and coordWorldToPixel for calculate beetwen world and screen - which is a little compilcated function; - andengine have similar function for converting beetwen world and screen; - actionscript - here I don't understand why but every tutorial has getting screen coords and dividing it by scale function.
I ask this questions because all of the above have one common point: screen coords for 0,0 are in left top corner. Is box2d written different for every port ?
I will be grateful for explanation.
Update
I don't have very big troubles with box2d actionscript. My problemy is: why when I'm setting body position to (0, 0) it's displayed in left top corner of window in short words. In any other box2d ports (processing, jbox2d, andengine box2d extension) if I set body position to (0, 0) it's displayed in the center of window. I know rules about pixel per meters etc.