Hello, I'm making a game where the player character has stretch powers (think Mr. Fantastic), and one of the attacks in a stretch punch that sort of works like a yoyo. Originally I had issues implementing this and everything I tried didn't seem to work (custom movement, physics) until I tried this:
The method in the above link uses a for loop to simulate the yoyo effect. It works but the arm always stretches at fixed length. I want to change so that if the fist (ball) was the come in contact with barrier it would immediately contract.
Illustration of what I'm trying to achieve:
http://i.imgur.com/SfZaLnK.png
Screenshot of For Loops:
http://i.imgur.com/mMYeYAU.png
Project DL Link:
https://dl.dropboxusercontent.com/u/4173094/StretchPunchDemo.zip