Download

how to make a slowing and a stopping parameter for a projectile

Hi, I’m kind of new to UE4 and i would like to know how to make a parameter for the projectile which is a mesh or a particle(if the process differs i would love to know how to do each of them)to slow down on hitting a certain static mesh i have created and another parameter for when the bullet should stop after penetrating the same static mesh(not like bullet drop, i want it to stay in the exact spot the projectile had reached after it stopped completely)

feel free to explain it like I’m total noob :slight_smile:

Thank you in advance

To stick the projectile to the Hit Mesh you must get the hit result from the OnComponentHit, inside your projectile class, and do like this pic:

2203c5986fa1142729b3a009939827590060d972.jpeg

That worked for me.

I’m a bit confused about the slow effect you want to add, but I think you want to add two parameters on the Projectile Spawn to use as filter to apply slow OR the stick effect.
So, to do that you must make the logics inside the projectile class to check what static mesh it has hit. Get that from the OnComponentHit, again, and make the filters as you wish. To apply the Slow effect, you can directly change the projectile velocity from the projectile component, multiplying it by a <1 number to slow its speed.

To make the two meshes exposed on spawn, you must add those two variables inside the Projectile Class and, if you see in the details there’s a checkbox saying “Expose on Spawn”. Just tick

I have managed to make the stick effect when shooting meshes but i want to make it so that the projectile stick only to a certain mesh that i specify

and what i meant by slow effect is that ill have one parameter for the bullet to slow down on impact(making hes way through the object) and and then for it to stop after a while(and to have a parameter for this too)

while the idea of or slow or stick effect is nice and ill like to try it too, i still didn’t manage to do it

also when the projectile sticks to the mesh it always kind of teleports to the middle of the object it hits, is there a way to make more then one location for it to end up in? and for it to show the bullet actually making hes way into the stopping location instead of snapping into place?

Think of the mesh as a transparent object that the bullet travels too