1
我在Andengine
中创建了下面的六边形结构,Box2D
物理引擎。当其他球与物理结构碰撞时,我想关于中心旋转整个结构。AndEngine旋转所有连接的物体
的发现参考的形象在这里:reference question
我试图weld joint
和revolute joint
与机构,但根据需要将其不进行适当的运动。所有的机构都附有weld joint
和顶点具有revolute joint
与中心体是静态的一样,
RevoluteJointDef revoluteJointDef1 = new RevoluteJointDef();
revoluteJointDef1.initialize(centerB, movingBody[i], centerB.getWorldCenter());
revoluteJointDef1.enableMotor = true;
revoluteJointDef1.motorSpeed = 0;
revoluteJointDef1.maxMotorTorque = 1f;
this.mPhysicsWorld.createJoint(revoluteJointDef1);
有没有进行整体结构的平稳旋转的任何其他方式? 谢谢。
有没有什么办法,如果我可以添加一个大圆盘体,并将球附加在它的顶部将旋转所有的身体? – Harry
您的结构是否需要由多个物体制成,或者它可能是单个物体上的多个装置? – iforce2d
我正在用多个物体构建它,但是如果可以检测到单个物体上的个体固定物比它好。 – Harry