Creating Gear Joints

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Connorses
Citizen
Posts: 63
Joined: Fri Sep 06, 2013 7:02 am

Creating Gear Joints

Post by Connorses »

I'm trying to use the Gear Joint, and I've got 2 bodies attached to a static body via Prismatic Joints. The prismatic joints work fine; adding the gear joint causes both bodies to lock in place. I noticed that the Gear Joint page says "the joints it uses connect their respective bodies to the ground and have the ground as the first body". I think this is my problem. What does "the ground" mean and how do I attach things to it?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Creating Gear Joints

Post by raidho36 »

It means that gear-connected bodies cannot float freely, they must be connected to the ground by the joints you lock together by gears, and those joints must lock ground to body, not body to ground - function argument order matters too.
Connorses
Citizen
Posts: 63
Joined: Fri Sep 06, 2013 7:02 am

Re: Creating Gear Joints

Post by Connorses »

Hey, so I figured it out just now! I had to set the ratio to a negative number. The prismatics locked in place because they were both trying to move past their limit.
Post Reply

Who is online

Users browsing this forum: No registered users and 86 guests