Making an object swing from rope to rope - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Making an object swing from rope to rope (/thread-9869.html)
Making an object swing from rope to rope - xcodist - Feb 14, 2012 11:32 AM
I've been trying to make an object swing from rope to rope using Cocos2D and Box2D. I've had a lot of issues right from setting up the ropes. I found a tutorial (http://www.cocos2d-iphone.org/archives/1112) that shed some light on issues, but I am still quite lost. Please could someone help me. Thanks in advance!
RE: Making an object swing from rope to rope - ipeku - Feb 20, 2012 05:53 AM
Are you making a Tarzan game? (if so let me know when it's ready).
I'm not familiar with cocos or box2d but I would imagine that first you would make the ropes swing (either a pendulum or segments / dots connected where every segment would act under gravity).
In the pendulum case once the character is attached to it you would move it according to the angle of the pendulum and the radius (distance from the attach point of the Liana/rope). In the segment case the character would be attached to one of the segments and temporarily become a part of the rope structure.
In any case I'd start off as simple as possible and not try to solve the entire problem at once.