Hi Mogas,
Just a little note to let everyone know that this isn't a site where anyone can get free development time.
This site is run for hobbyists, and as such is not into bulk production problems.
But just in case you are a hobbyist just trying to solve a problem, this might help a little.
Why the square pin?
If the nose is shaped correctly on a round pin, and the spring pressure is correct, it should automatically keep itself in an upright position whilst swinging the nose thru an arc. The problems arise if the recess it is fitting in has any straight sides, then the nose can tilt over, in which case you would require side guidance of the pin to keep it upright.
If you would require the pin to stay upright with the hole providing guidance, then the sketch below might be a possible solution for you. It can all be carried out with a drill press and lathe, plus a bit of filing on the pin nose.
You can easily develop it using a bit of scrap material, and once you have the correct sizes for the side holes (they shouldn't need to be very big), then it is just a matter of transferring it over to the original items.
P.S. the stabilising pin thru the main pin should be the same diameter as the small side holes, and the ends rounded over by hand to fit the small side grooves formed. Also, you wouldn't need to drill all the way thru, then weld it up, as you won't need to file the hole square
Hope this helps
John