I have constructed a lock and key assembly with about 20 parts and have most of it working in mechanism so that when the key is entered into the keyhole, the pins move with the key accordingly.
This video below is for the sake of visualizing how a lock and key works, it is not of my assembly but is the same idea:
So I am having difficulty having the lower pins (the ones that are between the key and the upper pins) push the upper pins upwards as the key is inserted. I can make the pins rigid to eachother, but I want to have the lower pins eventually rotate away from the upper pins when the key is turned so making them rigid to eachother will not work.
Basically I want to make a connection between two FLAT surfaces so that when one surface touches the other, it will push it, but is not rigid to it. I have done this between a 3D surface and flat surface with the "3D contact connection" but have not found a way to do this between two flat surfaces. I have tried cam connection also but it does not let me do it between two flat surfaces.
I attached a picture of the actual assembly with the key inserted into the lock, but in the picture the pins are rigid to eachother and are basically acting as one pin instead of two, I want them to be separate, but when they hit eachother they will move together and not pass through eachother.
I hope I have made this clear enough, any help would be really appreciated!
Use Cam and Follower. This would ensure that as the key goes in, the pins would follow the profile of the key and would go up and down. However, if you wish to animate the spring, you may need to define the spring as a flexible component and then animate or use mechanism dynamics. I have not tried the spring part of of.... but that is how I would proceed.