I’m trying to realize the reflection of light in 2d.
There is a light source which sends a beam (Physics.Raycast), when the beam falls on some sort of object in front of him, I want it to reflect from the object at an angle.
To determine the angle at which the beam should be reflected by a 2-ray support built triangle and its angles are calculated. The problem is that I do not know how to send the beam (Physics.Raycast) from the point of contact with the object at an angle.
The approximate outline of how it looks.
Maybe I’m doing wrong and there is a ready-made solutions of similar problems, I just do not know them. If you have any suggestions how to do it differently with pleasure to listen to them.
Sorry for my English.