0
$\begingroup$

Is there any option in bpy to get a feedback from the particle when it collides with the collision object? I tried to search in the attributes of

import bpy
dg = bpy.context.evaluated_depsgrpah_get()
evob = bpy.context.object.evaluated_get(dg)  # assuming it is particle emitter
evob.particle_systems[0].particles[0]

expecting something like evob.particle_systems[0].particles[0].is_colliding, but there is nothing suitable, as far as I can see. I also tried to look in the attributes of instances objects:

import bpy
dg = bpy.context.evaluated_depsgrpah_get()
for instob in dg.instance_objects:
    if instob.particle_system:
        instob

But it seems there is also nothing related to the collision. And in the bpy.data.objects["Collision"].collision which is the collision object there are only settings for the collision physics.

Is there straightforward way to get feedback about collision in bpy? Or the only way is to calculate the distance from each particle to the closest point on the collision object's mesh and to compare the results with some given threshold each frame?

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .