sample method

  1. @override
void sample(
  1. ParticleStorage storage,
  2. int index
)
override

Writes the spawn position and unit emission direction for particle index into storage.

Implementation

@override
void sample(ParticleStorage storage, int index) {
  storage.posX[index] = 0.0;
  storage.posY[index] = 0.0;
  storage.posZ[index] = 0.0;
  storage.velX[index] = direction.x;
  storage.velY[index] = direction.y;
  storage.velZ[index] = direction.z;
}