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.
constructor Create(const Owner: TAgkObject; const Sprite1: TAgkSprite; const Sprite2: TAgkSprite; const X1: Single; const Y1: Single; const X2: Single; const Y2: 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 X1: Single |
The X coordinate of the sprite 1 anchor point. |
const Y1: Single |
The Y coordinate of the sprite 1 anchor point. |
const X2: Single |
The X coordinate of the sprite 2 anchor point. |
const Y2: Single |
The Y coordinate of 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.
TAgkDistanceJoint
Copyright (c) 2012. All rights reserved.
|