Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Rope! #143339
07/25/07 14:19
07/25/07 14:19
Joined: Jan 2007
Posts: 110
USA East Coast
K
KojaK Offline OP
Member
KojaK  Offline OP
Member
K

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 Offline
Expert
xXxGuitar511  Offline
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: xXxGuitar511] #143341
07/25/07 14:41
07/25/07 14:41
Joined: Jan 2007
Posts: 110
USA East Coast
K
KojaK Offline OP
Member
KojaK  Offline OP
Member
K

Joined: Jan 2007
Posts: 110
USA East Coast
Physics ball constraint?


Lead programmer for Two Screws Loose Click here for our forums, and downloads for our games
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 Offline
Expert
xXxGuitar511  Offline
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
K
KojaK Offline OP
Member
KojaK  Offline OP
Member
K

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: KojaK] #143344
07/25/07 18:49
07/25/07 18:49
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
depends on how your doing it/what engine (newton or 3DGS)


xXxGuitar511
- Programmer
Re: Rope! [Re: xXxGuitar511] #143345
07/25/07 18:56
07/25/07 18:56
Joined: Jan 2007
Posts: 110
USA East Coast
K
KojaK Offline OP
Member
KojaK  Offline OP
Member
K

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 Offline
Expert
xXxGuitar511  Offline
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
K
KojaK Offline OP
Member
KojaK  Offline OP
Member
K

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
Re: Rope! [Re: KojaK] #143348
07/25/07 19:57
07/25/07 19:57
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
for the .pan based force, try phent_addtorqueglobal/local. That should do what you're trying to do.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1