我试着用旧的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;
答案 0 :(得分:1)
你可以让你自己的静体作为地面体。