This command will create a gear joint between the specified bodies. This type of joint will automatically move the second body whenever the first is rotated. The BodyID1 and BodyID2 specify the bodies involved and should be the integer handles of those bodies. These bodies must already be connected to another body with a revolute or prismatic joint. The JointID1 and JointID2 should be the handles of those joints. The ratio controls how the rotation on the first body is converted to upward movement on the second body - will it be slow or fast?
This type of joint can be used with two revolute joints, a revolute joint and a prismatic joint, or two prismatic joints. Just note that if your wish to delete one or both of the joints or bodies involved you need to delete the gear joint first.
Image Source: Box2D User Manual
SyntaxReturn as Integer = b2CreateGearJoint(ID as Integer,
Body1ID as Integer, Body2ID as Integer, Joint1ID as Integer,
Joint2ID as Integer, Ratio as
Float)