Trying to make a particle react differently to different collisions

0 like 0 dislike
32 views

Hi, I'm trying to make a rain particle that reacts to different objects based on what they are, i.e. grass has a splash and water has a ripple effect. However, I have no idea where to start or how to get it working. I know of some thing in PopcornFx called Collision Filters and another Surface Types but I don't know if these are useful for what I'm wanting. As a whole here's what I have so far and this particle is for UE4. 

asked Aug 10 by Jamesking96 (660 points)

1 Answer

1 like 0 dislike
 
Best answer

Hi, sorry for late answer,

Yes you can spawn different particules system depending on the material you are colliding with (with UE).
Using the PopcornFX's editor's "scene.intersectExt" function, you can then unpack the result with "scene.unpackSurfaceType" and get the SurfaceType previously added on a static mesh in UE.

After that, you will be able to use that surfacetype id to trigger different kind of event. Like a rain splash.

Let me know if you need any complementary information.

Cheers,

answered Aug 22 by Maxime (5,100 points)
Hi,

I found out how to do what I was struggling with a couple of days ago, It was exactly what you've typed here, but thanks for answering as it confirms that this was the way to do it correctly.

Also quick note, the scripting reference online has some spelling mistakes scene.unpackSurfaceType() is written as scene.unpackSceneSurface().

Thanks again.
Indeed, we saw that in your previous question, we are going to change it. Thanks for the report !

Looking forward to hearing from you again, I hope you will make the effects you desire to create.
...