Game Development Community

Help needed in drawing a rope.

by Viren Thambidorai · in Technical Issues · 04/16/2007 (11:14 pm) · 12 replies

Hi,

I am developing a demo using TGEA, I need a help in drawing a rope.

The scenario is my player would be behind a vehicle and is on skate, he would be attached to the vehicle with a rope. so the problem i am facing is to get the rope physics.

I started with the car demo provided by torque. I am planning to use ODE physics for this, but the problem is i need to create a separate ODE vehicle and player,I dont know how would it affect to watever i have down, can anyone suggest me how can i go with this. I really need a help here.

Thanks in advance,
Raghav.

#1
06/21/2007 (12:21 am)
null
#2
06/21/2007 (1:09 am)
I'm not really sure I can give to many pointers, but I'd also be interested in seeing how to get Torque to play nicely with a physics engine. As for the question about the vehicle, that is not quite clear. Are you asking what needs to go into ODE's scene graph?
#3
06/28/2007 (2:21 am)
Thanks David Stocker and Per Henrik Field,

I just wanted to draw a simple rope, I wanted to know if there is any way i could do it using Torque. Any suggestions would be great. what i have done now is i drew a 3D line for the rope. but i doesnt look good. i wanted a better way to draw my rope.

Raghav.
#4
06/28/2007 (2:40 am)
Hi

I suppose it depends on how you are modelling it on ODE. It would probably be a good idea to map it to some sort of 'chain' (aka 'bone' but in this case 'chain' makes more sense as you are not modelling a character) model. Your rope would be a series of 'chain's complete with joints. Each of these joints would have a counterpart in ODE. Skin this 'chain' as is done for player characters, add a rope texture and you have a pretty good graphical representation of a rope with a physics model that ensures it reacts as one would expect.

Interesting stuff. Keep it up and keep us posted.

Rob
#5
06/28/2007 (2:43 am)
One possibility might be to use some kind of targetting/seeking projectile with particles that look like sections of rope. You would need to get weapon projectile seeking in the engine first, however. Martin Schultz added some code recently that has basic seeker functionality in it, so that might be a good starting point.

Another suggestion would be to look into the lightning code that already has behaviors in place for showing visual effects from one point in 3D space to another.
#6
06/29/2007 (2:18 am)
Hi Rob,

I did try an ODE rope, i created a 'chain' of small pipes(box) connecting them by joints but the frame rate decreased a lot.when i created less number of pipes it works fine, but if i decrease the number the rope would be very short.

Can u tell me how can i add a rope texture to the ODE rope.
What i did was created a dts for each pipe and connected them to get the graphical representation.

Thanks,
Raghav
#7
06/29/2007 (2:25 am)
Hi Aaron,

Thanks for the suggestion i will try that out.

Raghav.
#8
06/29/2007 (6:11 am)
Raghav,

to keep good performance, you would need to create a new class. I have no idea what the best way to simulate a rope is in ODE as I have never used it but you should avoid using lots of .dts to visualize the result in Torque; it should be just one object using one chain that is skinned.

I will take a look at it and get back to you.

Regards,
Rob
#9
06/29/2007 (8:58 am)
..
#10
07/01/2007 (10:42 pm)
Rob,

I did create a new class for my rope. How can i skin my rope with a single dts file ? is there any ways where i can use a single dts to represent all the boxes of my chain, if this can be done it would great.

Thanks,
Raghav
#11
07/01/2007 (10:45 pm)
Berserk,

Its a great idea, but then i dont know whether we can mount a vehicle on another one.

Thanks,
Raghav,.
#12
07/02/2007 (7:20 am)
.