Make 2 lines, then get the intersection point

how would i get a point between 2 lines (and the lines themselves) like this terribly dramn image, i already how to get the midpoint by lerping the players cframe and the enemies cframe with a 0.5 alpha.

point i wna get is the black dot, the camera

2 Likes

You can use triangle solving math to get this corner, see that MidPoint → Player is hypotenuse, this mean that you can use trigonometry to find the final point

2 Likes

sorry, as I have the trig understanding of a 6yr old, I have no idea how to find coordinates in a triangle, can you provide a formula or method pls?

EgoMoose made tutorial about triangles, and he probably introduced triangle solving here:

I don’t really understand the image.

So the camera point is the intersection of the two lines, but how are the lines defined?

All I will say, if you have two lines using the vector equation for a line r = a + λb, you can find the intersection (if there is one) by equating them, then solving simultaneously for either scalar, then subbing that scalar back in to find the point.

js realised this is not where i want the camera to be

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.