Game Development Community

Rope Swing Issue

by Abhinav Chokhavatia · in Torque Game Builder · 10/07/2008 (3:30 am) · 4 replies

Hi,
I am using TGB 1.7.3 Pro, and working on plat former game. Now I have a issue I want rope in our game, but unable to make rope swing horizontally or vertically. or even very difficult to mount player on it and changing animation. What I want is that rope swing vertically and horizontally which must follow the rule of spring (physics), or even it look like that. And if possible player movement on vertical and horizontal rope. One more thing I want to mention that we are using Windows XP as Operating System, so some inbuilt function is not working perfectly...

Regards
~Abhi...

#1
10/08/2008 (11:34 am)
Can,t help with the problem, but I would go with 1.7.4 if I were you. I had a lot of issues with .3 and the PSK.

By horizontal rope, do you mean hand over hand style from under the rope? I had wondered about that as well. I would imagine just the platformer behavior on the rope for a tight rope walker style. But a difficulty staying on would be good ( random programed lean with a corresponding arrow side move to correct? ).

Don,t quite understand the -inbuilt function is not working perfectly- thing. ???
#2
10/30/2008 (3:39 pm)
Rope/Spring physics aren't built into Torque - you'd have to roll your own, or incorporate a physics engine which includes them. Depending on the specifics of your game, you may be able to fake it with an animation.
#3
11/26/2008 (6:20 pm)
Yes, it's my understanding that you would need soem kind of linked physics behaviour to get this to work... and this isn't native to torque. You can implement box2d if your brave. Alternatively you can do a pretty good job of faking it if you don't need the rope to streach, or do anythign too advanced.

1) All you have to do is make an image of a rope. Then just rotate the image.. and you will have your rope swinging. (you will run into one problem where the rope spins from the center.. to fix this.. just delete half of the rope from the image before you save it.. this will give it the appearance of swinging at the end. instead of rotating in the center.)

2) Create an attach point at the end or the rope, then attach, detach your dood onto that.

3) write game logic to rotate the rope image. (done)
#4
11/26/2008 (6:50 pm)
Yes, it's my understanding that you would need soem kind of linked physics behaviour to get this to work... and this isn't native to torque. You can implement box2d if your brave. Alternatively you can do a pretty good job of faking it if you don't need the rope to streach, or do anythign too advanced.

1) All you have to do is make an image of a rope. Then just rotate the image.. and you will have your rope swinging. (you will run into one problem where the rope spins from the center.. to fix this.. just delete half of the rope from the image before you save it.. this will give it the appearance of swinging at the end. instead of rotating in the center.)

2) Create an attach point at the end or the rope, then attach, detach your dood onto that.

3) write game logic to rotate the rope image. (done)