Download

Custom emitter based off of physmat [UE4 Impact Effects Marketplace]

Hello,

Currently I am at a loss on how to approach this, as I am still fairly new to UE4 blueprints. A while back I purchased a VFX pack that came with Physmats, decals, and bullet impact animations. After learning the engine better, I am now trying to put all of it together. So far I have found a way to spawn an emitter, but I am not sure how to get the correct emitter based off of the physcal material (or if that’s even the correct way to do it)

The only way I could think, is to compare the physmat the raytrace is returning, with each individual physical material. Then based off of what material it gets, spawn the decal and the particle emitter. I would imagine that would be super sloppy, and be a very, very massive blueprint tree. So for all you blueprint experts out there, what is the best way of going about doing this?

TLDR:
If I hit an object with a physmat of wood instead of metal, how do I get the wood emitter NOT the metal emitter?

The Hit Result returns the **Phys Mat ** (as you can see) then you can read the Surface Type variable from it and use a Switch node to spawn different emitters, sounds etc. based on the surface type.

Docs on how you can setup the surface types.

Thank you for the fast reply.

Could you provide an image to explain how to use a switch node in such a fashion?

-Sent from my Android via TapaTalk

Just drag the pin off the Phys Mat (from the hit result), search for Surface Type… then drag the pin off the Surface Type node and search for Switch (which will give you a switch by surface).

I hope that’s clear enough :stuck_out_tongue:

@TK-Master Very clear, the only issue is that you cannot add pins, so I’m at a loss on how it works with the Physmats. Would a string conversion and check work? (see below)
4d8a5f7f9ad48e9b2aace2e312ba44cab3cb8db2.png

For anyone else wondering, string conversion is working beautifully for me. Thanks tons TK-Master.

You shouldn’t have to use “Add pin” or string… that’s odd… this is how it should look like:

3f062627903a2bfba4c597c1396defa22b56d020.jpeg

Have you set your custom physical surface types in the project settings (under Physics)?

Yea I did, and that’s why I found it very odd. The particles spawn now, which is nice. The only thing is sometimes the chunks get stuck in the wall :stuck_out_tongue:

Hmm the only thing that I can think of is that you created the switch node before setting the surface types (in which case, right click and refresh the node).

But it doesn’t really matter that much anyway, since you got it working.