AnsweredAssumed Answered

Trying to make a locking mechanism?

Question asked by John Smith on May 29, 2017
Latest reply on May 29, 2017 by Laurits Peter Solvtoft

So I am trying to create a locking mechanism.

Here is a picture of it.

Essentially, when it is in this position, I want the square vertical peg to NOT be able to rotate on the plane parallel because if this was a real object, the peg is restricted on all sides by the hole it is stuck in.

However, in this case that clearly doesn't work out because objects can overlap.

The only time it should be able to rotate freely is when the peg is above the hole as shown here:

Is there a way to mate/relate everything so that I can freely move/rotate the peg in a circular path and know that the software itself will stop the objects at the right point if two parts collide?