How do i make leg joints?

i am trying to make leg like joints for a 2d stick figure that can move in the 2d space and it cant collide with other parts of the body.

I have tried using hinges but they just wont stick or they just like do like this https://gyazo.com/9b7c3c7cf7b5ebf32a1f225a88efd762 made the legs purple and body black for demonstration purposes. But i think u can see what i mean. Btw i set gravity to 1 so u can see it whitout it falling.

I have tried using diffrent joints too but that dont work. Hinges works best so far.

So how do i make it look good? like a 2D stick figure. Kinda like this https://www.google.com/imgres?imgurl=https%3A%2F%2Fimg.favpng.com%2F10%2F8%2F2%2Fpivot-animator-stick-figure-animaatio-animation-download-png-favpng-BvKB40XMxeTRx0xEqxHEzit4y.jpg&imgrefurl=https%3A%2F%2Ffavpng.com%2Fpng_view%2Fanimation-pivot-animator-stick-figure-animaatio-animation-download-png%2F22JrP7sd&docid=BdVzuDFJtSvzDM&tbnid=c2f5Wu7NqBPN4M%3A&vet=10ahUKEwiIoYaMocbmAhXtl4sKHRXIBP0QMwhVKBIwEg..i&w=820&h=530&client=firefox-b-d&bih=966&biw=1920&q=2d%20stick%20figure&ved=0ahUKEwiIoYaMocbmAhXtl4sKHRXIBP0QMwhVKBIwEg&iact=mrc&uact=8#h=530&imgdii=EaVusT0Q2fSa8M:&vet=10ahUKEwiIoYaMocbmAhXtl4sKHRXIBP0QMwhVKBIwEg..i&w=820

If I were you, I would just do it the normal rigging way which is to use Motor6D to rig the parts.
image
image

simple walk animation:

I don’t know if this is the look that you want, but I imagine that 2d stick figures do walk (kind of like that).

i mean kinda like no animation really. Have u played stickfight? https://www.youtube.com/watch?v=YBlEslDQSEQ i want to make it kinda move like that

Ah, looked at the video and I really can’t get my head around it and think how to do that yet, sorry.

tried fixing it using springs… I made something else https://gyazo.com/716966125b6bbb1fa05dbaa0c7cb9c98

You can try using BallSocketConstraints (as well as HingeConstraints maybe) to make a realistic ragdoll leg