嗨,我现在是farseer物理引擎的新手,无论如何,我在这里读过关于Farseer3.31的教程http://roy-t.nl/index.php/2012/09/06/farseer-physics-3-3-1-and-xna-joints/
在本教程中,他试图将桨体附加/连接到世界withJointFactory.CreateFixedRevoluteJoint中,不幸的是,在Farseer3.5中没有CreateFixedRevoluteJoint方法,只有CreateRevoluteJoint连接两个物体,那么如何将一个物体连接到世界对象?
发布于 2013-11-17 01:24:21
使用RevoluteJoint。让你的桨绕着另一个物体旋转。就像这样:
Body motorPaddle = CreateMotorPaddle();
Body motorPaddleAxle = BodyFactory.CreateCircle(World, 0.1f, 1f);
var j = JointFactory.CreateRevoluteJoint
(
World,
motorPaddle,
motorPaddleAxle,
new Vector2(0.0f, 0.0f),
new Vector2(-14.0f, 10.0f)
);
// set speed and torque
j.MotorSpeed = MathHelper.Pi;
j.MotorImpulse = 100;
j.MotorEnabled = true;
j.MaxMotorTorque = 100; 更多细节这里
https://stackoverflow.com/questions/19982871
复制相似问题