Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

I have the movement and rotation restrained properly, but the simulation is not behaving like it should. both objects are rigid body objects. enter image description here

How can I make my gear simulation work?

share|improve this question
up vote 18 down vote accepted

This problem is caused by the moment and rotation restraints on the top gear. To fix this, I recommend removing them:

enter image description here

Now, if you run the simulation,

The top gear is responding to the collision with the bottom gear. This is progress. (smile! - it almost works)

enter image description here

We just need to get the gear to ignore translation, but still respond to rotation. This can be done using a rigid body joint.

enter image description here

Now, we need to apply the right settings to the joint.

enter image description here

This joint will allow no translation, and will only allow rotation along the X axis. But this joint works relative to another object. We need to put a stationary object in the target field.

A static cube will work. (any other static object should also work as well)

enter image description here

Now, we simply set that cube to be the target object.

enter image description here

The top gear will now have it's X,Y, and Z translation locked to the cube's position, and since it is static, it will not be moving. The top gear's Y and Z rotation is also locked to the cubes rotation, and since it is a static cube, it also will not be rotating. The last step (this is optional) is to paint it your favorite color.

enter image description here

Now we can test the simulation:

enter image description here

Yay! it works!

share|improve this answer
It's pretty cool that the physics engine is able to simulate this, but it also seems like a big waste of computational power - usually a game would just hard-code the fact that the gears' rotational speeds are linked, and calculate them directly, instead of simulating collisions between all the gear teeth. – immibis Jan 4 at 0:52
I know, this type of simulation would be for checking if gears actually line up and would actually work. There would be no point to ever actually calculate this for a game. – X-27 Jan 4 at 1:10
"(this is optional)"—[citation needed]! :) – wchargin Jan 4 at 6:52
Returned the favour again. Selecting the "favorite color" is definitely the best part ;) lol. Thanks for this great answer! – poor Jan 7 at 16:03
@poor um.. what favor? – X-27 Jan 7 at 17:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.