Confusing error message and other (probably) beginner questions

Hi, i am making my first game in unreal and it involves shooting lasers and bouncing them off mirrors

but as long as at some point i don’t point the lasers at a mirror (hit a wall) during play it gives me this error (i assume every frame the laser isn’t hitting a wall)

also i was wondering if there is a way to condense many blueprint nodes into one somehow becuase my code to create a start and end point for each end of each beam emmitter that makes up my lazer is huge, can i make it smaller or make it so do dont have to har code in each reflection.

the ones in orange control the second reflection, so you can see how after reflecting a couple times this could get cumbersome.

Thanks in Advance!

  1. About error. You process hit result every time. But you need to use “return value” of trace function with branch, to understanf is something hit or not. And you need to cast hit actor to your mirror class, and process it only if cast successfull.

  2. To make few traces from mirror to mirror, you need to use recursive function. It will look like trace-> branch-> cast-> some processing-> call to this function. So it will call itself when trace hit mirror actor.