Exemplo n.º 1
0
 public void Initialize(IntPtr bA, IntPtr bB, Vector2 anchor)
 {
     bodyA = bA;
     bodyB = bB;
     API.GetLocalPoint(bodyA, anchor, out localAnchorA);
     API.GetLocalPoint(bodyB, anchor, out localAnchorB);
 }
Exemplo n.º 2
0
 public void Initialize(IntPtr bA, IntPtr bB, Vector2 anchor1, Vector2 anchor2)
 {
     bodyA = bA;
     bodyB = bB;
     API.GetLocalPoint(bodyA, anchor1, out localAnchorA);
     API.GetLocalPoint(bodyB, anchor2, out localAnchorB);
     length = (anchor2 - anchor1).magnitude;
 }
Exemplo n.º 3
0
 public void Initialize(IntPtr bA, IntPtr bB, Vector2 anchor, Vector2 axis)
 {
     bodyA = bA;
     bodyB = bB;
     API.GetLocalPoint(bodyA, anchor, out localAnchorA);
     API.GetLocalPoint(bodyB, anchor, out localAnchorB);
     API.GetLocalVector(bodyA, axis, out localAxisA);
     referenceAngle = API.GetAngle(bodyB) - API.GetAngle(bodyA);
 }
Exemplo n.º 4
0
 public void Initialize(IntPtr bA, IntPtr bB, Vector2 groundA, Vector2 groundB, Vector2 anchorA, Vector2 anchorB, float r)
 {
     bodyA         = bA;
     bodyB         = bB;
     groundAnchorA = groundA;
     groundAnchorB = groundB;
     API.GetLocalPoint(bodyA, anchorA, out localAnchorA);
     API.GetLocalPoint(bodyB, anchorB, out localAnchorB);
     lengthA = (anchorA - groundA).magnitude;
     lengthB = (anchorB - groundB).magnitude;
     ratio   = r;
 }