I am looking to make a project where you use a laser to aim a rebounding object and am stuck on how to make the laser rebound/ reflect off of surfaces
Do a line trace to the first hit. Store the start and end points.
Get the normal of the surface hit. Calculate the angle of the line with the surface normal.
You basically want the inverse of that angle to use to trace a new line from the first hit location and then repeat the process. ( I’m not great at math, it may not exactly be the inverse, but you basically do a reflection of the angle. )
For each of the pairs of start and end locations, spawn and scale a cylinder with a very small radius and no collision that stretches between the points, with a material on it that gives the laser effect that you want. for testing you could start simple with an emissive, then make it more artistic after you got the math right for reflecting the angles and spawning the cylinders working good.
thank you for the answer but i am new and am not sure what you mean sorry