Calculating triangle directions

Blitz3D Forums/Blitz3D Programming/Calculating triangle directions

Just give them random velocities in the X/Z directions betweeen, say, -10.0 and 10.0. Same in Y except only velocities above 0.0.

Then every frame move the particles by their velocities:

MoveEntity ThisParticle, ThisParticleXV#, ThisParticleYV#, ThisParticleZV#

Turn them so they spin a bit:

TurnEntity ThisParticle, 4, 8, 2

Decrease the Y velocity for gravity so they fall back down:

ThisParticleYV# = ThisParticleYV# - 0.5

And delete them when they get below ground level.

You don't need to mess around calculating angles or anything.