Hello,
I search a possibility to get the location of the intersection of two or more lines. In the picture you can see the point where the green arrows intersect.
How could I do it?
Hello,
I search a possibility to get the location of the intersection of two or more lines. In the picture you can see the point where the green arrows intersect.
How could I do it?
hmm and which coordinates? I have only the 4 coordinates of the starting points. Maybe I could get the vectors of the directions.
It’s the 4 coordinates you have , x1, y1, x2, y2… it’s the ends of the lines…
[ATTACH=JSON]n1694676[/ATTACH]
@N-1-K_01 Do you want some BP?
if you have an expample in a Blueprint, of course. That would be very helpful.
@N-1-K_01 Yikes, see this article:
Looks like you might want to find a new way of thinking about this…
Why are you trying to find the intersection?
Thank you.
I need this point, because it is the curve center of my vehicle.
The intersection of only two of this arrows/lines would also work.
@N-1-K_01 That nightmare code above is only for 2 dimensions!
Why not just put a component at the centre of your vehicle, then you can just get it’s world position?..
Yes, now I got it. I made it otherwise. But both ways don’t give me the right coordinates.
I don’t need the center point of my vehicle. I need the coordinate of the curve center point.
It works! Thank you very much for your help. Perfect
@ClockworkOcean But I want to extend this formula from 2D into 3D…
Yup, good luck with that!..
So, it works.
But it is very buggy and I don’t know why. The 2D version works fine. @ClockworkOcean
Here ist my way to calculate it:
@N-1-K_01 Gimme a while, I think you might have it wrong…
@N-1-K_01 Yup, some bits are wrong, I think. Also, to be sure, that top line: Is the dot meant to be dot-product or multiply?..
For sure I think you have ‘a’ wrong in axb.
@ClockworkOcean the calculation gives the right coordiante, only in some ticks is it wrong and not perfect smooth. But in 99% it works fine.
@N-1-K_01 Strange, doesn’t work for me at all. I just end up with X1 the whole time…