Ctrl+K

PulleyJoint

Declaration

public class tainicom.Aether.Physics2D.Dynamics.Joints.PulleyJoint

The pulley joint is connected to two bodies and two fixed world points. The pulley supports a ratio such that: length1 + ratio * length2 ⇐ constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.

Inherits: tainicom.Aether.Physics2D.Dynamics.Joints.Joint

Constructors

PulleyJoint

Constructor for PulleyJoint.

void PulleyJoint(Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 worldAnchorA, Vector2 worldAnchorB, float ratio, bool useWorldCoordinates = false)

Parameters:

Name Type Description
bodyA tainicom.Aether.Physics2D.Dynamics.Body The first body.
bodyB tainicom.Aether.Physics2D.Dynamics.Body The second body.
anchorA Strawberry.Math.Vector2 The anchor on the first body.
anchorB Strawberry.Math.Vector2 The anchor on the second body.
worldAnchorA Strawberry.Math.Vector2 The world anchor for the first body.
worldAnchorB Strawberry.Math.Vector2 The world anchor for the second body.
ratio System.Single The ratio.
useWorldCoordinates System.Boolean = false Set to true if you are using world coordinates as anchors.

Properties

LocalAnchorA

The local anchor point on BodyA

Vector2 LocalAnchorA { get set }

LocalAnchorB

The local anchor point on BodyB

Vector2 LocalAnchorB { get set }

WorldAnchorA override sealed

Get the first world anchor.

Vector2 WorldAnchorA { get set }

WorldAnchorB override sealed

Get the second world anchor.

Vector2 WorldAnchorB { get set }

LengthA

Get the current length of the segment attached to body1.

float LengthA { get set }

LengthB

Get the current length of the segment attached to body2.

float LengthB { get set }

CurrentLengthA

The current length between the anchor point on BodyA and WorldAnchorA

float CurrentLengthA { get }

CurrentLengthB

The current length between the anchor point on BodyB and WorldAnchorB

float CurrentLengthB { get }

Ratio

Get the pulley ratio.

float Ratio { get set }

Methods

GetReactionForce override

Vector2 GetReactionForce(float invDt)

Parameters:

Name Type Description
invDt System.Single

GetReactionTorque override

float GetReactionTorque(float invDt)

Parameters:

Name Type Description
invDt System.Single