particle + bounce ?

Posted By: darkinferno

particle + bounce ? - 10/26/11 12:18

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....
Posted By: HeelX

Re: particle + bounce ? - 10/26/11 12:51

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.
© 2024 lite-C Forums