Hi,
If i define a body using and set its position as
groundBodyDef.position.Set(0.0f / 30.0 , 15000.0f/30.0); // where 30 is the ratio => 1 meter = 30 pixels
In pixels its position is ( 0, 500)
then i define a polygon shape and use setAsBox function like
groundBox.SetAsBox(360.0f/30.0, 90.0f/30.0);
My doubt is how the SetAsBox is laid out :
by declaring groundBox.SetAsBox(360.0f/30.0, 90.0f/30.0); // (12, 3)
it draws a box from the position ( 0, 500) pixels and the box size will be (24 width, 6 height) and its extent will be from ( 0,500)
If i define a body using and set its position as
groundBodyDef.position.Set(0.0f / 30.0 , 15000.0f/30.0); // where 30 is the ratio => 1 meter = 30 pixels
In pixels its position is ( 0, 500)
then i define a polygon shape and use setAsBox function like
groundBox.SetAsBox(360.0f/30.0, 90.0f/30.0);
My doubt is how the SetAsBox is laid out :
by declaring groundBox.SetAsBox(360.0f/30.0, 90.0f/30.0); // (12, 3)
it draws a box from the position ( 0, 500) pixels and the box size will be (24 width, 6 height) and its extent will be from ( 0,500)