This is PuppetBot. He’s a 2D marionette controlled by LeapMotion.
I had this idea when I was brainstorming ways to make interactions with the physics engine more engaging than just clicking. Puppets like this are familiar to people, so I thought it would be nice and intuitive. The physics engine I used is Box2D, and the code is all pretty simple; I have a set of limbs that are attached to each other by joints. I also have some ropes (really just lots of little rectangles) connecting those limbs to points whose coordinates are determined based on the coordinates of your actual fingertips. [I will put my code on GitHub soon, but I need to go back through it and make sure everyone is credited appropriately first]
A lot of the decisions I made for this project were in the interest of making the puppet easier to use. For example, I lengthened the segments in the ropes so that movements didn’t take as long to “wave” down the rope before they affected the puppet. This is also why I made the ropes fairly short, instead of having them permanently reside above the top of the window, as I had originally planned. I made the body parts as heavy as I could so they wouldn’t bounce all over the place, but if I made them too heavy they strained and broke the ropes. I played around with friction/density/restitution settings a lot to try and find the perfect ones, but to no avail. I did a few other things just for personal aesthetic reasons, like making it so that the knees never bend backwards (this happened a lot before and I didn’t think it looked good). I went with the robot design because I thought it would fit best with the jerky/unbalanced movement I was bound to get. I think it look like he’s short-circuiting whenever the physics gets broken:
Ultimately, PuppetBot is not as easy to control as I would have liked, but he’s still pretty fun to play with. And all things considered, I’m not much better with real marionettes, either…