AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkPrismaticJoint.Create Constructor (TAgkObject, TAgkSprite, TAgkSprite, Single, Single, Single, Single, Boolean)

Creates a prismatic joint between two sprites. The prismatic joint allows the sprites to only move along a given axis relative to each other.

Syntax
Pascal
constructor Create(const Owner: TAgkObject; const Sprite1: TAgkSprite; const Sprite2: TAgkSprite; const X: Single; const Y: Single; const VX: Single; const VY: 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 X: Single 
The X coordinate of the anchor point. 
const Y: Single 
The Y coordinate of the anchor point. 
const VX: Single 
The X component of the axis. 
const VY: Single 
The Y component of the axis. 
const CollideConnected: Boolean = False 
(options) whether the two sprites connected by the joint can collide with one another. 

It can be thought of as a piston with the sprites unable to rotate at each end. It is similar to a line joint except that relative rotation is prevented. Specify a single anchor point in world coordinates with the sprites already at the desired relative position, at the piston's minimal extent. From this point the sprites will be allowed to separate along the given axis and rotate as a whole, but not rotate relative to each other. The anchor point can be offset from the sprite center positions. 

A joint may be deleted by the system if any of the sprites it connects are deleted. 

This joint supports motors and limits. 

TAgkPrismaticJoint

Copyright (c) 2012. All rights reserved.