mmi
05-07-2003, 07:09 PM
Is there a way of locking particles in a specified direction? I want to run forces and collisions on a bunch of particles, but I want each particle to keep its creationtime z-axis position.
I was thinking of forcing it, probably something like my example below... but the results could be strange right? There is probably a much better way of doing this...
Add a initPositionPP attribute.
In the creation expression:
initPositionPP = worldPosition;
In the runtime expression:
vector $worldPosition = worldPosition;
vector $initPositionPP = initPositionPP;
float $posX = $worldPosition.x;
float $posY = $worldPosition.y;
float $posZ = $initPositionPP.z;
vector $newPosition = <<$posX, $posY, $posZ>>;
flockShape.position = $newPosition;
BTW, are runtime expressions executed after dynamics?
I was thinking of forcing it, probably something like my example below... but the results could be strange right? There is probably a much better way of doing this...
Add a initPositionPP attribute.
In the creation expression:
initPositionPP = worldPosition;
In the runtime expression:
vector $worldPosition = worldPosition;
vector $initPositionPP = initPositionPP;
float $posX = $worldPosition.x;
float $posY = $worldPosition.y;
float $posZ = $initPositionPP.z;
vector $newPosition = <<$posX, $posY, $posZ>>;
flockShape.position = $newPosition;
BTW, are runtime expressions executed after dynamics?
