AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkDistanceJoint.Create Constructor (TAgkObject, TAgkSprite, TAgkSprite, TAgkPoint, TAgkPoint, Boolean)

Creates a distance joint between two sprites. The distance joint keeps the sprites a certain distance apart whilst being allowed to rotate freely around the anchor points.

Syntax
Pascal
constructor Create(const Owner: TAgkObject; const Sprite1: TAgkSprite; const Sprite2: TAgkSprite; const P1: TAgkPoint; const P2: TAgkPoint; 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 P1: TAgkPoint 
The sprite 1 anchor point. 
const P2: TAgkPoint 
The sprite 2 anchor point. 
const CollideConnected: Boolean = False 
(options) whether the two sprites connected by the joint can collide with one another. 

Specify two anchor points in world coordinates with the sprites already at the desired distance apart. The anchor points can be offset from the sprite positions. A joint may be deleted by the system if any of the sprites it connects are deleted.

Copyright (c) 2012. All rights reserved.