Is it possible in Unreal to have a particle collision spawn a decal on the surface it collides on? For example, if I wanted to have blood droplet particles accurately spawn blood splatters where they land. I haven’t done a whole lot of research into it yet, but I figured I’d ask here first.
Yes, You can set up events in your particle system and trigger a blueprint which will spawn your decals.
Alternatively you can do it all in blueprint which may generate more accurate results, since particle collisions can be quite inconsistent from my experience.
in the end it really depends on the situation and the complexity your after.
Blood splatters on ground: Easy
Blood Splatters on moving target: Medium
Blood splatters dripping on animated target: Very Hard.
I’d just want it landing on static surfaces, any idea what a blueprint solution would look like?
Blueprint 1 spawns blood projectiles - check out the first person weapon for an example of projectiles.
Projectile Blueprint flies through the world until a Collision happens and then dies.
On Collision you spawn your decal - here you might have to do some logic to determine if the hit was a wall or a floor.
Give it a go and post up if you have problems
Simple setup like this, you don’t necessarly need to trace your impact location depending on how you set up your blueprint, but i find this handy to use if you want to add particles and other fancy stuff.
Linetrace has all the info you need.
Note: you’d still need a start and end trace for this to work
there is also the PEX (particle extention kit) on the marketplace, it allows for much more options in cascade… like spawning decals.
You can add a collision module and then use an OnParticleCollide in BP’s to trigger all kinds of things
This is how to make the OnParticleCollide Event work inside your Blueprint with Cascade. I assume Niagara has a better solution though.
Add a ParticleSystemComponent to it (Method1) or Spawn an Emitter via Blueprint (Method2)
Method1: Select your ParticleSystemComponent and click on the ‘+’ on the OnParticleCollide Event
Method2: Drag your spawned ‘Emitter’ noodle out and go on ‘Bind Event to OnParticleCollide’. Drag out the ‘Event’ noodle and go on ‘Create Custom Event’
Do whatever you want to do after either the OnParticleCollide Event (Method1) or your CustomEvent (Method2). You can get the location of the collision, the normal etc. In this example I’m spawning a Decal at the collision location.
Add ‘Actor Collision’ module to the emitter
Use the following collision settings:
Add EventGenerator (is definitely needed!). Add Event to EventGenerator, Type -> Collision.
Hit play and enjoy Blueprint Events from particle collision
Hey Luos can you link this? Can’t find it on the marketplace, thanks!