Hi there,
is there a way to give a shape some color, because my movieclips are not aligning up with the shapes so,
to me when testing when the movieclips are positioned correctly, the shapes are not.
this would be a nice feature for box2d as well if it does not exist,
currently that is how i am defining my shape and attaching a clip from the library,
any ideas on how to give my b2BoxDef shape some color?
thanks
C
is there a way to give a shape some color, because my movieclips are not aligning up with the shapes so,
to me when testing when the movieclips are positioned correctly, the shapes are not.
this would be a nice feature for box2d as well if it does not exist,
Code:
//bottom
var boundMCB:Sprite = new boundMC();
bodyDefB = new b2BodyDef();
bodyDefB.userData = boundMCB;
bodyDefB.userData.height = boundMCB.height * 2;
bodyDefB.userData.width = _stage.stageWidth;
bodyDefB.userData.name = "topBoundMC";
boxDefB = new b2BoxDef();
boxDefB.extents.Set( bodyDefB.userData.width / 2 , bodyDefB.userData.height / 2);
boxDefB.density = 0;
bodyDefB.AddShape(boxDefB);
bodyDefB.position.Set(_centerPoint.x , getBoundBottom() + boxDefB.extents.y - 10);
_stage.addChild(bodyDefB.userData);
var boundBoxB:b2Body = m_world.CreateBody(bodyDefB);
_boundsArray.push([bodyDefB.userData, boundBoxB]);
var boundMCB:Sprite = new boundMC();
bodyDefB = new b2BodyDef();
bodyDefB.userData = boundMCB;
bodyDefB.userData.height = boundMCB.height * 2;
bodyDefB.userData.width = _stage.stageWidth;
bodyDefB.userData.name = "topBoundMC";
boxDefB = new b2BoxDef();
boxDefB.extents.Set( bodyDefB.userData.width / 2 , bodyDefB.userData.height / 2);
boxDefB.density = 0;
bodyDefB.AddShape(boxDefB);
bodyDefB.position.Set(_centerPoint.x , getBoundBottom() + boxDefB.extents.y - 10);
_stage.addChild(bodyDefB.userData);
var boundBoxB:b2Body = m_world.CreateBody(bodyDefB);
_boundsArray.push([bodyDefB.userData, boundBoxB]);
currently that is how i am defining my shape and attaching a clip from the library,
any ideas on how to give my b2BoxDef shape some color?
thanks
C