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

Creates a pulley joint between two sprites.

constructor Create(const Owner: TAgkObject; const Sprite1: TAgkSprite; const Sprite2: TAgkSprite; const Ground1: TAgkPoint; const Ground2: TAgkPoint; const Anchor1: TAgkPoint; const Anchor2: TAgkPoint; const Ratio: Single; const CollideConnected: Boolean = False); overload;
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 Ground1: TAgkPoint 
The ground point for sprite 1. 
const Ground2: TAgkPoint 
The ground point for sprite 2. 
const Anchor1: TAgkPoint 
The anchor point for sprite 1. 
const Anchor2: TAgkPoint 
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.

Copyright (c) 2012. All rights reserved.