Hmm... I seemed to have figured it out, though not really sure why it didn't work before. What I did to fix it was move the world initialization out of the scene manager's ( I know, I know. The name is bad, but w/e) constructor and into the Start() method which is called at the beginning of a scene.
I do have one more question, however. To be sure I am doing things right, Box2D considers the center of the window as the origin, correct? So, if I had an 800x600 window, then the origin of the physics world in pixels would be (400, 300)? I know that Box2D works in meters and not pixels, but I want to be sure I have the origin correct for the conversions.
Show differencesHistory of post edits
#1jonbonazza
Posted 12 March 2012 - 12:33 PM
Hmm... I seemed to have figured it out, though not really sure why it didn't work before. What I did to fix it was move the world initialization out of the scene manager's ( I know, I know. The name is bad, but w/e) constructor and into the Start() method which is called at the beginning of a scene.
I do have one more question, however. To be sure I am doing things right, Box2D considers the center of the window as the origin, correct? So, if I had an 800x600 window the center of the scene in pixels would be (400, 300)? I know that Box2D works in meters and not pixels, but I want to be sure I have the origin correct for the conversions.
I do have one more question, however. To be sure I am doing things right, Box2D considers the center of the window as the origin, correct? So, if I had an 800x600 window the center of the scene in pixels would be (400, 300)? I know that Box2D works in meters and not pixels, but I want to be sure I have the origin correct for the conversions.