# CreateGearJoint

## Description

Creates a gear joint between two existing joints. The gear joint allows appearance of two existing joints to be locked together in perfect friction. The sprites that will be joined will be sprite 2 on both joints, sprite 1 on both joints must be a static sprite. A joint ID will be returned to reference this joint later, a joint may be deleted by the system if any of the sprites it connects are deleted. This joint should be deleted before any of the joints it depends on are deleted.

## Definition

integer CreateGearJoint( iJoint1, iJoint2, ratio )

UINT agk::CreateGearJoint( UINT iJoint1, UINT iJoint2, float ratio )

CreateGearJoint( iJointIndex, iJoint1, iJoint2, ratio )

void agk::CreateGearJoint( UINT iJointIndex, UINT iJoint1, UINT iJoint2, float ratio )

## Parameters

- iJoint1 - The ID of the first joint to join.
- iJoint2 - The ID of the second joint to join.
- ratio - The gear ratio to use in moving one joint from the other.
- iJointIndex - The ID for the gear joint.