Wololo
Motion is basically object's teleporting from one position to another each frame. The issue is when the cog spins fast the wall is on one side of the object one one frame and the other side on the next.
Solutions to solve this either use:
* math to calculate if the paths of the two objects cross
* or checking positions in between the frames.
Here's a rough idea of the latter:
https://dl.dropboxusercontent.com/u/542 ... tween.capx