Saturday, 25 May 2013

Changing Volume and mass of of B2Polygon object does not changes it's volume .why?

Changing Volume and mass of of B2Polygon object does not changes it's volume .why?

'body' contains body which is sent from world.querypoint.On it i am resizing it and increasing it's mass but it's density remains the same. fbs.GetDensity shows output as 1 . :(
    var fbs:b2Fixture=body.GetFixtureList();
     var fg:b2MassData=new b2MassData();
      fg.mass=1000;

      var poly:b2PolygonShape = fbs.GetShape() as b2PolygonShape;
      poly.SetAsBox(200/worldScale,200/worldScale);

      body.SetMassData(fg);
      //trace(fbs.GetDensity());

No comments:

Post a Comment