Sorry about the title but hopefully it sums what I’m trying to achieve. Here are more details:
I’m trying to implement a beam weapon for an FPS game. I’m not sure if I’m doing this right but I have managed to create the beam by adding a particle as a component in my character’s blueprint and setting the Beam Source Point and End Point .
Here is the component view:
And here is the related graph:
Length of the beam is currently fixed to 500 units but how can I set the end point of the beam dynamically to the surface of the mesh/brush player is looking at?
Hi! I have been doing something similar with laser weapons the other day. Have you seen this [beam particle tutorial][1]? You can add a Target module to your beam particle and set the beam mode to Target, this is the way I got it working, but you may be fine just using Beam end.
Anyway, what you need is a Line trace. It will launch an invisible line from point to point and return the intersection location. These traces are pretty powerful, for example, you can “launch” a shape and determine all actors which intersect with it on its path. Take a look at my setup.