box2d 2.2 b2Body GetGroundBody方法已消失

box2d 2.2 b2Body GetGroundBody方法已消失,box2d,Box2d,我尝试暂停使用旧的box2d=2.2 var jointDef:b2MouseJointDef=new b2MouseJointDef(); jointDef.bodyA=world.GetGroundBody(); // what does it need to be now? jointDef.bodyB=touchedBody; jointDef.target=mouseToWorld(); jointDef.maxForce=1000*touchedBody.GetMass(); m

我尝试暂停使用旧的box2d<=2.1编写的教程 我无法理解如何替换b2Body的GetGroundBody方法 至box2d>=2.2

var jointDef:b2MouseJointDef=new b2MouseJointDef();
jointDef.bodyA=world.GetGroundBody();   // what does it need to be now?
jointDef.bodyB=touchedBody;
jointDef.target=mouseToWorld();
jointDef.maxForce=1000*touchedBody.GetMass();
mouseJoint=world.CreateJoint(jointDef) as b2MouseJoint;

你可以让你自己的静止物体像地面物体一样工作。

你可以让你自己的静止物体像地面物体一样工作