query particle traveling direction in world space coordinates


#1

Hey guys I’m trying to query whether a particle is traveling in the positive y axis or negative y axis direction in world space coordinates but can’t find a solution

any help would be much appreciated

cheers!


#2

Put this check in your runtime expression for the particle. ‘direction’ is just a PP attribute I created for the particle.

vector $vel = velocity;

if ($vel.y > 0)
	direction = 1;
else if ($vel.y < 0)
	direction = -1;

Cheers Jake


#3

thanks…