0 registered members (),
984
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Rope!
#143339
07/25/07 14:19
07/25/07 14:19
|
Joined: Jan 2007
Posts: 110 USA East Coast
KojaK
OP
Member
|
OP
Member
Joined: Jan 2007
Posts: 110
USA East Coast
|
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?
Lead programmer for Two Screws Loose
Click here for our forums, and downloads for our games
|
|
|
Re: Rope!
[Re: KojaK]
#143340
07/25/07 14:22
07/25/07 14:22
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
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.
xXxGuitar511 - Programmer
|
|
|
Re: Rope!
[Re: KojaK]
#143342
07/25/07 14:47
07/25/07 14:47
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
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...
xXxGuitar511 - Programmer
|
|
|
Re: Rope!
[Re: xXxGuitar511]
#143343
07/25/07 16:25
07/25/07 16:25
|
Joined: Jan 2007
Posts: 110 USA East Coast
KojaK
OP
Member
|
OP
Member
Joined: Jan 2007
Posts: 110
USA East Coast
|
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?
Lead programmer for Two Screws Loose
Click here for our forums, and downloads for our games
|
|
|
Re: Rope!
[Re: xXxGuitar511]
#143345
07/25/07 18:56
07/25/07 18:56
|
Joined: Jan 2007
Posts: 110 USA East Coast
KojaK
OP
Member
|
OP
Member
Joined: Jan 2007
Posts: 110
USA East Coast
|
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?
Last edited by KojaK; 07/25/07 18:58.
Lead programmer for Two Screws Loose
Click here for our forums, and downloads for our games
|
|
|
Re: Rope!
[Re: KojaK]
#143346
07/25/07 19:00
07/25/07 19:00
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
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
xXxGuitar511 - Programmer
|
|
|
Re: Rope!
[Re: xXxGuitar511]
#143347
07/25/07 19:55
07/25/07 19:55
|
Joined: Jan 2007
Posts: 110 USA East Coast
KojaK
OP
Member
|
OP
Member
Joined: Jan 2007
Posts: 110
USA East Coast
|
So there's no "angle_to_vec()" or "add_force_angle()" or something?
Thanks for the help anyway.
Lead programmer for Two Screws Loose
Click here for our forums, and downloads for our games
|
|
|
|