I’d suggest setting up a beam particle between the weapon and the target.
We’re completely different genres, but the thinking is the same - I have a wand. When I fire, I get the hit location under my mouse cursor - for you it’d be whatever you’re using to aim. The origin is my wand. The hit result broken down provides me with a selection of different ways to express my target point.
I also run a simple trace for my character. This is handy, as it allows you to grab any intervening actors or terrain. If the trace doesn’t match the hit, then the trace will set my target point.
I take that hit result - that’s my desired hit location.
I fire off my beam particle.
I set the vector parameters of my beam. I set my Target point, and I set my source point.
The beam is cosmetic - it’s the trace and the hitresult that will register the impact.
BP Incoming.
The rest is done in cascade.
EDIT! - For a miss - your vectors will be your impact point. Ignore the cursor hit variable there and just feed your line trace results into the vectors.
Ignore the warnings, I just cropped out and put some of the mechanics into constructionscript. You can use anything you want to check for a miss. The best result is comparing cursor hit and line trace locations. (see part4)
Hey thx for the reply.
I thought about this workflow too and I think I will use it for laser beams thx a lot for BP this will help me a lot.
But in case of the gatling I need bullets with a tracer (like that from ribbon particle ??).
So I don´t think that I can split the beam particle into bullet peaces thats why I thought about a mesh and this ribbon trace.
I just dunno if this will work or if its possible to split a beam particle or using a complete differnt particle to reach my goal.
This setup will work for any bullet. Try not to confuse how something looks with how it functions. The trace is essentially your bullet. You can absolutely change the cosmetics to have it look how you want. You don’t need to make a bullet mesh.
If you’re thinking rapid fire - just fire off the function once for each shot. This is substantially less overhead than trying to process a hundred and one meshes whizzing about.
Have a look at the documentation for beam particles - it will definitely do what you want to achieve.
My advice is to start with this beam. You’ll be able to see how it works. Then do some reading on particles and play with cascade to make your tracer look how you want it to. A beam doesn’t have to look like a beam. My current setup now also uses allsorts of different effects and includes allsorts of modifiers like Rate of fire and critical hits.
In fact, if you still wanted to, you could use a projectile actor set up to follow the trace. You could give it a ribbon effect too. You’d just have some thinking to do about setting up what happens when it hits a target.
I recommended this function because it’s a lot less labour intensive, and when you fire, you only repeat this process for each shot. With a projectile you’d have to deal with more data, which may create overhead.
Ultimately though - this is your project - NEVER COMPROMISE! - Unless of course you have to.