/// <summary> /// Creates a revolute joint. /// </summary> /// <param name="bodyA"></param> /// <param name="bodyB"></param> /// <param name="localAnchorB">The anchor of bodyB in local coordinates</param> /// <returns></returns> public static FSRevoluteJoint CreateRevoluteJoint(FSBody bodyA, FSBody bodyB, FVector2 localAnchorB) { FVector2 localanchorA = bodyA.GetLocalPoint(bodyB.GetWorldPoint(localAnchorB)); FSRevoluteJoint joint = new FSRevoluteJoint(bodyA, bodyB, localanchorA, localAnchorB); return(joint); }
/// <summary> /// Creates a prsimatic joint /// </summary> /// <param name="bodyA"></param> /// <param name="bodyB"></param> /// <param name="localanchorB"></param> /// <param name="axis"></param> /// <returns></returns> public static FSPrismaticJoint CreatePrismaticJoint(FSBody bodyA, FSBody bodyB, FVector2 localanchorB, FVector2 axis) { FVector2 localanchorA = bodyA.GetLocalPoint(bodyB.GetWorldPoint(localanchorB)); FSPrismaticJoint joint = new FSPrismaticJoint(bodyA, bodyB, localanchorA, localanchorB, axis); return(joint); }