I was wondering, how should I do a scene where the initial state has no particle velocities. Like if I made a clean surface, I would like to see min to max 0.0 values in particle velocity statistics not the freeze transformation way.
I tried to write a code, but somehow, this is not working. Maybe the velocity could not be reset this way, just like getX()...
If You know any other way, it would be also great.
Code: Select all
def onSimulationStep():
threshold = 0.0
emitter = scene.getEmitter("Circle01")
particle = emitter.getFirstParticle()
while (particle) :
vel = particle.getVelocity()
vel_mag = vel.module()
if ( vel_mag > threshold):
vel == 0.0
particle = emitter.getNextParticle()
Have a great day!