What causes rotating objects to 'slip'? This sounds like it should be simple but I've googled and looked through SE questions but can't find a good solution to the following problem. I have a shaft with a keyseat machined into it, a key and a geometrically correct involute gear. I want this as true to life as I can, I want the shaft to rotate the key which then transmits its power to the gear using physics. After about four rotations, it looks as though the gear has rotated a little more than the shaft. If anything I would have expected the opposite. This is what I have:

1) a cylindrical shaft with a square keyseat (using a rectangular prism/boolen subtraction)

2) a key in the keyseat (just a rectangular prism parented to the shaft)

3) a complex geometrically correct involute gear (constructed using an XYZ surface to calculate the gear faces consisting of about 3000 vertices - the least number I could make it).

4) the gear and the shaft have rigid body collision settings set to shape:mesh, source:base, friction:1.000, margin: 0.040. It has rigid body dynamics set to damping translation: 1.000, damping rotation:0.000

5) the shaft has the same settings except for surface response(friction):1.000

I have tried changing the rotation and damping and found that if I turn on collision margin it makes things a lot worse. Could anyone help point me in the right direction please?
The Rigid Body World default values are OK for crude approximations of physics without much computational overhead but can be tweaked to produce more accuracy. In particular, try adjusting the following settings :

Increasing Steps Per Second should give a better simulation as each simulated step will be smaller and so more accurate. Similarly, increasing the number of Iterations gives it more chance to settle on a stable solution. Enabling Split Impulse should stop objects bouncing apart at unexpected velocities if/when the simulation results in them overlapping.
Try significantly increasing the number of Steps and Iterations and see if that improves your simulation and also try with Split Impulse enabled and disabled. Once you've got acceptable results you can try gradually reducing them to get a good balance between realism and efficiency.