I am making a Tarzan-like game and have been brainstorming on making a body swing from one rope to another. Using Box2d and Cocos2d I have made a rope of revoulute joint segments with the body attached to lowest segment using a weldjoint. I was thinking about setting some conditions to know if the segment farthest away from the rope's fixed point has moved a certain angle triggered by a mousejoint (for example 60 degrees from it's initial point) and destroy the original weldJoint whiles applying a force to move the body to another the other rope (creating a new weldJoint). I don't know whether I am explaining this well. But this seems to make sense to me in theory. Is this a good way to approach this problem.
Asked
Active
Viewed 377 times
1
-
Do you want Tarzan to leap when he's got good velocity, or when the player commands it? – Beta Aug 06 '12 at 11:50
-
It's a combination. When the player swipes Tarzan in the opposite direction his velocity will increase in the direction of a rope to the other side. – dropcode Aug 06 '12 at 12:04
-
I guess the hack is where and how to destroy the original weldjoint so that the body has enough velocity to push it to the next rope, creating a new weldjoint. – dropcode Aug 06 '12 at 12:13
-
By the way if you've done this you could implement the ability to swing Tarzan's body by shaking the phone. Would be nice :-) – danijar Aug 26 '12 at 21:49