public static RevoluteJoint CreateRevoluteJoint(World world, Body bodyA, Body bodyB, TSVector2 anchor) { TSVector2 localPoint = bodyA.GetLocalPoint(bodyB.GetWorldPoint(anchor)); RevoluteJoint revoluteJoint = new RevoluteJoint(bodyA, bodyB, localPoint, anchor, false); world.AddJoint(revoluteJoint); return(revoluteJoint); }
public WheelJoint(Body bodyA, Body bodyB, TSVector2 anchor, TSVector2 axis, bool useWorldCoordinates = false) : base(bodyA, bodyB) { base.JointType = JointType.Wheel; if (useWorldCoordinates) { this.LocalAnchorA = bodyA.GetLocalPoint(anchor); this.LocalAnchorB = bodyB.GetLocalPoint(anchor); } else { this.LocalAnchorA = bodyA.GetLocalPoint(bodyB.GetWorldPoint(anchor)); this.LocalAnchorB = anchor; } this.Axis = axis; }