Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualjonbonazza

Posted 12 March 2012 - 12:34 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, 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.

#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.

PARTNERS