Original Post
Hey everyone,
I recently got interested in physics games and would like to create a small project using box2d. I have everything set up ready to go but I don't understand the conversion ratio from pixels to meters. How would I do this? Another thing that has been confusing me is which coordinate system I should be thinking in if box2d uses the Cartesian system and SDL uses the top left as 0,0 (don't know what the name for this system is). Normally I would program in terms of pixels. With this being said, if I have a sprite at location 100,100 in SDL terms, how does this translate to Box2D coordinates? Wouldn't I need to be keeping track of two coordinate systems? (If so, this is gonna drive me nuts). Hopefully you guys understand what I'm having trouble understanding. I've been looking for a good article on google all day but nothing has really helped make this click for me.
Language: C++
Drawing API: SDL
Thanks
I recently got interested in physics games and would like to create a small project using box2d. I have everything set up ready to go but I don't understand the conversion ratio from pixels to meters. How would I do this? Another thing that has been confusing me is which coordinate system I should be thinking in if box2d uses the Cartesian system and SDL uses the top left as 0,0 (don't know what the name for this system is). Normally I would program in terms of pixels. With this being said, if I have a sprite at location 100,100 in SDL terms, how does this translate to Box2D coordinates? Wouldn't I need to be keeping track of two coordinate systems? (If so, this is gonna drive me nuts). Hopefully you guys understand what I'm having trouble understanding. I've been looking for a good article on google all day but nothing has really helped make this click for me.
Language: C++
Drawing API: SDL
Thanks