Hey all,
I'm not super awesome at scripting, but I'm giving it a go...
I have a sweaty bottle here with particles emitted from an object, then I'm running a bigger drop down the bottle emitter from a sphere-emitter.
What i'd like to do is use getCollidingObject to move colliding particles to the sphere-emitter when they're colliding with the same emitter.
I'm guessing that's not supported atleast not with getCollidingObject, or did I just make an error in the script?
def onSimulationStep():
e = scene.get_PB_Emitter("Object01")
t = scene.get_PB_Emitter("Sphere01")
parts = e.getParticlesColliding()
for p in parts:
obj = p.getCollidingObject()
if (obj.getName() == t):
t.addParticle(p.getPosition(), p.getVelocity())
e.removeParticle(p.getId)
Anyhow, I'd love some suggestions on pulling this off, tried with filterdaemon but even though that attribute is called particle collisions, it seems to only react to objects.
THanks for any help!
/D
Use particles with getCollidingObject() ??
Re: Use particles with getCollidingObject() ??
Hi izo,
You could try to test the neighbours instead of the collision flag.
I don't have the documentation here right now, but in case you can't ask a particle which emitter it belongs to, you can check if it is inside the array of the Sphere emitter particles.
Best regards
You could try to test the neighbours instead of the collision flag.
I don't have the documentation here right now, but in case you can't ask a particle which emitter it belongs to, you can check if it is inside the array of the Sphere emitter particles.
Best regards
Alex Ribao
RealFlow Team
Next Limit Technologies
RealFlow Team
Next Limit Technologies