How to set Beam End Point dynamically to the nearest colliding point where camera is facing?

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.

Here is a video I’ve found on Youtube, it is almost exactly what you need :slight_smile:
[- YouTube][3]

Perfect! This is exactly what I was looking for. Thank you very much :slight_smile: