Beam Reflection

This is done using light traces and either mesh + material or particles.

Here’s one way of implementing the visual beam:Intro to Cascade: Creating a Beam Emitter | 07 | v4.2 Tutorial Series | Unreal Engine - YouTube think you can find it already implemented in the Content Examples in the Learn tab.

Another beam tutorial:- YouTube
Do this for every Event Tick(frame):

  1. You do a line trace from the point of origin (weapon) in the direction to which you want your laser to go.
  2. If the line trace hits an object, get the material of the object hit by the line trace and you check if that material is the mirror material.
  3. Draw the beam between the two points of the line trace
  4. Then, if the material hit earlier is a mirror, get the angle of the line trace against the surface of the mirror mesh (the incidence angle), then mirror that by the surface normal to get the reflected light direction vector.
  5. Now, do another line trace from the inpact point in the direction of the reflected light.

You repeat the steps 2 to 5 each time you hit a mirror material.