Ejemplo n.º 1
0
 public static FSDistanceJoint CreateDistanceJoint(FSWorld world, FSBody bodyA, FSBody bodyB, FVector2 anchorA,
                                                 FVector2 anchorB)
 {
     FSDistanceJoint distanceJoint = new FSDistanceJoint(bodyA, bodyB, anchorA, anchorB);
     world.AddJoint(distanceJoint);
     return distanceJoint;
 }
Ejemplo n.º 2
0
 public override void InitJoint()
 {
     base.InitJoint ();
     joint = FarseerPhysics.Factories.JointFactory.CreateDistanceJoint(FSWorldComponent.PhysicsWorld,
         BodyA.PhysicsBody,
         BodyB.PhysicsBody,
         Microsoft.Xna.Framework.FVector2.Zero,
         Microsoft.Xna.Framework.FVector2.Zero);
     joint.CollideConnected = CollideConnected;
     joint.Frequency = Frequency;
     //joint.DampingRatio = 0.5f;
 }