Find Coordinates of Exit Point

I’m trying to make a bullet penetration system. Taking a look at the picture below could help explain what I want better.

If we know the coordinates of a square shape as well as AB vector with direction coefficient, how do we find X,Y for C point?

Basically I’m trying to find the X,Y coordinates of the point of the opposite side of an object of another point. As you can see I’m not exactly going for realism as it’s linear. Below are a couple more examples to clarify my objective.

This is for a 2D environment. I’m aware of the Raycast event but the thing is I can’t seem to find where I could retrieve the value I’m going for as stated above.

Any help is greatly appreciated :smiley:

Since you know DF and AB, you will know the angle of alpha, and since alpha equals to alpha’, and you know the length of BB’, you will know the length of B’C.
Thus you can know the XY of C.

I am not sure about the non-rectangle case, but I think it will be similar.