Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Railgun above ground #49069
07/12/05 16:18
07/12/05 16:18
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline OP
Expert
slacer  Offline OP
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Hi,

I want to create a projectile somewhere in the air and add a force to it in a
way that the projectile shoots away in a given direction.

What I did:
- define gravity (-385) for earth like gravity
- box physic for collision and rotating
and finally I played around with numbers

Code:
 phent_addforcelocal( pThrow1, vector( 200,2000, 20000),pthrow1.x); 



to make it fly.

But it allways falls down if it is above the ground.
The projectile is created in a passable object.
If I create two projectiles at the same position the explode away in two opposite directions (1 down 1 up), I really only need the up one.

Any ideas?

-- slacer

Re: Railgun above ground [Re: slacer] #49070
07/12/05 20:03
07/12/05 20:03
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline
Senior Member
Andreas C  Offline
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Hi,
I'm no expert when it comes to physics , but what about things like friction, mass, drag etc. ... did you set those up at all ?

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Railgun above ground [Re: Andreas C] #49071
07/12/05 22:04
07/12/05 22:04
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
The effect of a force is dependent on the object's mass. Lightweight objects will be more susceptible to acceleration due to forces. Depending on your PC the force will only be applied for 1/70th of a second. Use a loop to keep applying the force over a period of time.

Re: Railgun above ground [Re: Marco_Grubert] #49072
07/13/05 08:29
07/13/05 08:29
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline OP
Expert
slacer  Offline OP
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Quote:

Depending on your PC the force will only be applied for 1/70th of a second




This might be the problem because I called the function only once.

If the block collides with an animated entity it behaves as it should,
so damping, friction etc. is set to values which support the visual effect I
wanted to achieve.

[EDIT]
Yes, this was the problem - and the force was too small for the mass it should move.

Thank you
-- slacer

Last edited by slacer; 07/13/05 12:00.

Moderated by  HeelX, Spirit 

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