Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (clonman, TipmyPip, Niels, dBc, 1 invisible), 18,961 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
particle + bounce ? #385966
10/26/11 12:18
10/26/11 12:18
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i'm trying to use bounce/vec_bounce along with particles, am not sure how to accomplish this, i know i cant just write:


vec_bounce(p.vel_x, p.vel_x);

also what if i wanted to trace along the path a particle is moving, meaning, i want to trace from the current particle position to a position infront of it based on its velocity; ive tried calculating it using the distance covered this frame and last frame but i think i overlooked something....

Re: particle + bounce ? [Re: darkinferno] #385967
10/26/11 12:51
10/26/11 12:51
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Well, I would simply do the following:

A) save current position in a temporary vector
B) calculate new position according to vel_x and time_step
C) use temporary vector and new x,y,z position to trace
D) if you hit something, place particle to the hit x,y,z position and set velocity parameters to the bounce direction

Nevertheless, I could imagine that if you do this for each particle, your game could get awfully slow.

PhysX has particle fluids, though, this is not yet ported to Gamestudio. So, if you need a high performance and physically correct solution, try that.


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

Gamestudio download | 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