Rope!

Posted By: KojaK

Rope! - 07/25/07 14:19

How do I simulate rope in my game?

Oh, and how do I give a physics object a force based on an angle like .pan?
Posted By: xXxGuitar511

Re: Rope! - 07/25/07 14:22

To create rope:

Create a chain of small segments of rope. Make sure the textures line up so the rope looks continuous. Then connect each end to another with a ball constraint.
Posted By: KojaK

Re: Rope! - 07/25/07 14:41

Physics ball constraint?
Posted By: xXxGuitar511

Re: Rope! - 07/25/07 14:47

like a hinge constraint, but it rotates in all directions; you could even just use a hinge constraint, and make each one perpendicular to the last (to keep from panning between segments). Just make sure you add some resistance (if used physics engine lets you) so the rope doesn't bend too tightly...
Posted By: KojaK

Re: Rope! - 07/25/07 16:25

That's what I thought. I was just asking if it was a physics ball constraint.

What about applying a force to a physics object baised on an angle?
Posted By: xXxGuitar511

Re: Rope! - 07/25/07 18:49

depends on how your doing it/what engine (newton or 3DGS)
Posted By: KojaK

Re: Rope! - 07/25/07 18:56

3DGS, and I want to simulate a grenade.
I'm using the A6 version.

My grenade spawns, and flies off in one direction, no matter what. How do I change an angle into a velocity?
Posted By: xXxGuitar511

Re: Rope! - 07/25/07 19:00

1st, make sure it's not spawning inside another entity's bound box.

2nd, ph_addvelcentral(my, temp); - temp being the velocity

3rd, jus5t check out the manuals section on c-script->physics
Posted By: KojaK

Re: Rope! - 07/25/07 19:55

So there's no "angle_to_vec()" or "add_force_angle()" or something?

Thanks for the help anyway.
Posted By: MrCode

Re: Rope! - 07/25/07 19:57

for the .pan based force, try phent_addtorqueglobal/local. That should do what you're trying to do.
Posted By: JibbSmart

Re: Rope! - 07/26/07 08:03

vec_rotate. search for it in the manual. when you know how big you want the force to be, make that the x-component of the vector, with the y- and z- equal to 0. vec_rotate by the angle, and then you have that force in that angle. then use ph_addvelcentral or something similar.

i'm assuming this will answer your question -- if you just want to add torque then MrCode has your answer ^^

julz
Posted By: KojaK

Re: Rope! - 08/02/07 19:12

I tried the sin(angle) * force or something and it worked for me.

Thanks guys
Posted By: Memphis

Re: Rope! - 08/22/07 18:27

is there any example of this in action?, jus i'd prefere not to try if it is not as good as it sounds
Posted By: Shadow969

Re: Rope! - 08/22/07 18:57

you may try my newton example, there are ropes included
http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/777085/an/0/page/0#Post777085
Posted By: Memphis

Re: Rope! - 08/22/07 19:15

thanks will give that a try now
© 2024 lite-C Forums