Cant really explain that well, so heres an ms paint drawing
The Red dot is what the raycast has hit, then using the red dots position it finds the closest corner to the red dot from the Instance that the raycast hit.
The corner is now the origin, how would I get the green dot? (which is just a flipped red dot on the other side of the corner)
I’m basically trying to get the other side of the corner aka if the raycast weren’t to stop then the green dot is where the raycast would have exited the part (Assuming raycast is perfectly straight so the distance to the origin would be the same for both points).
Heres a top down view of the picture:
What I’ve tried:
I’ve tried multiplying the direction by -1, however what that gets me is:
I’ve also asked ChatGpt which gave me this:
When implementing it, it gave me:
Which is the same as multiplying direction by -1
I have no clue on how I would get the green dot, am I just complicating it?