Particle spawn on surface using surface normal

If I have a particle system with two emitters in it, and the first particles colliding with a surface spawn new particles at the hit locations, how do I switch the new particles from facing the camera to facing the surface normal of the hit surface?

Do I have to use Source > Event Generator Type > Blueprint ?

Can I bump this?

Hey tomofnz -

You should be able to set the 2nd emitter’s particle orientation to PSA_Velocity and it will inherit the Surface Normals direction based on the collision’s module.

Thank You

Eric Ketchum

Thanks - I will try it!
PSA_Velocity in the spawned particle Required section works for fixing the orientation, but at the same time the particles lose their own size and life settings and seem to inherit from the original emitter instead.

Hey tomofnz -

Try to uncheck the inherit velocity setting from the collision module and Event Generator.

Thank You

Eric Ketchum

It looks like this PSA_Velocity technique doesn’t work for mesh particles. Is there a way to orient mesh particles to the normal of the surface?

Inherit Velocity only seems to show in the produced/spawned particles, not the source particles. I can find only one case, and if it’s off then the new particles don’t stick on the surface at all. I made a video : https://www.dropbox.com/s/6jy2sapamo5rm58/tomofnz_ParticlesIssue.mp4?dl=0

Hey tomofnz -

Thank You for the video that helped clarify exactly what you are looking for. To achieve this exact behavior will take some use of blueprints and passing values into the particle system. I will work on developing a simple sample and post it when I am done.

Thank You

Eric Ketchum

Awesome - I’ll look forward to it!

Hey Tomofnz -

Well better really late than never, but I finally got time to set down and work on this issue again. It is actually fairly complicated because Rotators are extremely complicated and passing modified values between components can be tricky. That being said here is the Particle System break down which is a fairly easy setup. I have one emitter that functions as a drop and an event generator feeds the spawning of another emitter (Event Receiver) on Collision. This Event Generator allows our Blueprint to read that Hit Location. In the Collision Spawned Emitter, I have an Initial Mesh Rotation (this should work with a normal sprite as well just use Initial Rotation instead of Mesh Rotation) set up with a Vector Particle Parameter which we will set in our Blueprint.

Next the Blueprint, make an actor blueprint with your Particle System like follows:

We Start with the OnParticleCollide Node which registers each collision from that event generator, we take the normal of the point of collision and take a Cross Product of the Impact Normal and the Up Vector Normal (0,0,1) then normalize; this serves as the axis of rotation. Next we take the normal again this time running the Dot Product of the Impact Normal and the Up Vector (0,0,1) when then take the arc cos (inverse of cosine) of the Dot Product; this serves as our angle. Next we make a Rotator from our Axis and Angle using the Rotator from Axis and Angle Function. We then Break the Rotator because our Particle System wants a Vector value not a rotator and in Cascade Rotators run from 0 (0 degs) to 1 (360 degrees) which is what we do next but because we are dealing with Radians which run from 0 (0 degs) to 2Pi (360 degrees) we need to normalize to that range. After normalizing for range we need to take the inverse of each float (*-1) which keeps the Particle rotating the correct way in relation to the floor. Finally we make a vector out of our broken rotator pieces making sure to align XYZ correctly to (Roll, Pitch, Yaw) and pass the resulting vector into our Vector Parameter.

Some warnings about this setup it is once at spawn only for each particle. Each particle can change it int. rotation but it cannot change dynamically once spawned. So, this system would work will on an environment that is not moving but dynamic environments will cause problems unless it moves between the particle spawns.

Thank You for your patience -

Eric Ketchum

My thanks also way late … I didn’t notice an answer was posted till today.
I will check this out ; looks like some nice maths.