Download

How to activate particles when the player is moving on certain surfaces??

Hi, i want to put some particles when a vehicle is moving on concrete, or dust, just like the Vehicle Demo that comes with that but no matter how much i search, i cant find how to implement something like that. Any ideas how to activate particle systems depending on the surface the player is moving?

vehicle demo is c++ project, you only can see code with particle spawn realisation, but if you BP user its hard to understand(imho)

in blueprint you can do that like this:
0 create your water,concrete, dust and etc. physical materials
1 In your character (in persona animation graph) create event on every step
2 in this event you need to add single line trace(with ground direction) it will return hit with current physical material, and transform
3 Spawn new particle system and connect “select node” to your particle system template in, then connect returned physical material(step 2) to this select node, and last you need connect transform (from step 2) to spawned particle transform in(this need for spawn particles in character location)

ps with same method also you can create step sounds

Take a look at this tutorial: https://www.youtube.com/watch?v=XgMk2dYtGxA Instead of a sound, just spawn a particle :slight_smile:

Thank you, i will try it once i get home and post the results.

I managed to get the setup but, the problem is that the car doesn’t have any animation so i can’t add an anim notify event like to Foot Left. I tried “Event Blueprint Update Animation” but debugging the trace it stays at the start and doesn’t update when i move the car :confused:

Any ideas?

Still can’t find an alternative :confused: in the vehicle demo i can’t find anything like this in the animation blueprint. Does anyone knows a solution to this? I’m more of an art guy so C++ is out of question.

below image checks speed if true fires off every .2 seconds

Thank you! I will try it and post the results.

Ok so, the particle spawn works but…it spawns in a very far away location, i even tried checking “local” in the particle system emitter and that doesn’t fix the issue. Also, only “default” physical material is working, i have concrete and sand which are being used on the road and terrain respectively. I have created all the physical materials needed and added to their material instances, even the master material uses the physical material. Landscape’s layer info’s also have physical material. I will show a screenshot when i get home, any ideas? thanks for the help everyone

Ok so, no matter how hard i try the default physical material is the only one working :confused:

My other approach to this problem was to create a Particle System variable and instead of spawning after the trace, im setting up the variable. The location is now based on a socket, no there is no room for mistake in the location. The problem is that, only the Default physical material is working

Here is the setup:

You can see that i have my physical materials here:

And their setup:

They are being referenced in the Physical material slot for the materials i am using too… so i am running out of ideas i don’t know why it isn’t working :confused: Maybe any of you have had this kind of situation?

I cover this in my footprints tutorial this should get you where you need to be https://youtube.com/watch?v=JI84nFuLMSo

Thank you NanoVoxel, i will take a look at that!