AGK for Pascal
TAgkPulleyJoint.Create Constructor (TAgkObject, TAgkSprite, TAgkSprite, Single, Single, Single, Single, Single, Single, Single, Single, Single, Boolean)

Creates a pulley joint between two sprites.

Syntax
Pascal
`constructor Create(const Owner: TAgkObject; const Sprite1: TAgkSprite; const Sprite2: TAgkSprite; const GroundX1: Single; const GroundY1: Single; const GroundX2: Single; const GroundY2: Single; const AnchorX1: Single; const AnchorY1: Single; const AnchorX2: Single; const AnchorY2: Single; const Ratio: Single; const CollideConnected: Boolean = False); overload;`
 Parameters Description const Owner: TAgkObject the owner of the new joint (eg. a TAgkScene object). const Sprite1: TAgkSprite The first sprite to join. const Sprite2: TAgkSprite The second sprite to join. const GroundX1: Single The X coordinate of the ground point for sprite 1. const GroundY1: Single The Y coordinate of the ground point for sprite 1. const GroundX2: Single The X coordinate of the ground point for sprite 2. const GroundY2: Single The Y coordinate of the ground point for sprite 2. const AnchorX1: Single The X coordinate of the anchor point for sprite 1. const AnchorY1: Single The Y coordinate of the anchor point for sprite 1. const AnchorX2: Single The X coordinate of the anchor point for sprite 2. const AnchorY2: Single The Y coordinate of the anchor point for sprite 2. const Ratio: Single The ratio between the two sides of the pulley. const CollideConnected: Boolean = False (options) whether the two sprites connected by the joint can collide with one another.

The anchor points are world space coordinates that attach the joint to the sprite. The anchor points do not have to be on the sprite's center, or anywhere near the sprite, but this point will become the new center of rotation for the time the sprite is attached to the pulley.

The ground points are where the pulley rope will attach to the imaginary pulleys, and will remain fixed for the life of the joint. They need not be in the same location.

The ratio value determines the gear ratio between the two sides of the pulley. For example a value of 2 would mean that sprite 1 moves at twice the speed of sprite 2, but will experience half the force applied to sprite 2.

TAgkPulleyJoint