Announcement

Collapse
No announcement yet.

Get the intersection location of two lines/arrows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get the intersection location of two lines/arrows

    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?Click image for larger version

Name:	Unbenannt2.PNG
Views:	44
Size:	409.7 KB
ID:	1694233

    #2
    N-1-K_01 Yup, apparently it's:

    Click image for larger version  Name:	inter.JPG Views:	0 Size:	17.7 KB ID:	1694612

    Off you go...

    ( you've just got the 4 coordinates there... )

    Comment


      #3
      Originally posted by ClockworkOcean View Post
      N-1-K_01 Yup, apparently it's:

      Click image for larger version Name:	inter.JPG Views:	0 Size:	17.7 KB ID:	1694612

      Off you go...

      ( you've just got the 4 coordinates there... )
      hmm and which coordinates? I have only the 4 coordinates of the starting points. Maybe I could get the vectors of the directions.

      Comment


        #4
        It's the 4 coordinates you have , x1, y1, x2, y2... it's the ends of the lines...

        Comment


          #5
          Click image for larger version

Name:	image_178616.jpg
Views:	58
Size:	18.1 KB
ID:	1694676N-1-K_01

          Click image for larger version

Name:	image_178616.jpg
Views:	58
Size:	18.1 KB
ID:	1694676

          Comment


            #6
            N-1-K_01 Do you want some BP?

            Comment


              #7
              Originally posted by ClockworkOcean View Post
              N-1-K_01 Do you want some BP?
              if you have an expample in a Blueprint, of course. That would be very helpful.

              Comment


                #8
                N-1-K_01 Yikes, see this article:

                https://forums.unrealengine.com/deve...ines-4-vectors

                Looks like you might want to find a new way of thinking about this...

                Why are you trying to find the intersection?

                Comment


                  #9
                  Originally posted by ClockworkOcean View Post
                  N-1-K_01 Yikes, see this article:

                  https://forums.unrealengine.com/deve...ines-4-vectors

                  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.

                  Comment


                    #10
                    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?...

                    Comment


                      #11
                      Originally posted by ClockworkOcean View Post
                      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.Click image for larger version

Name:	awdawd.PNG
Views:	26
Size:	291.8 KB
ID:	1694980

                      Comment


                        #12
                        It works! Thank you very much for your help. Perfect

                        Comment


                          #13
                          ClockworkOcean But I want to extend this formula from 2D into 3D...

                          Comment


                            #14
                            Dumb question alert... But if the goal is ultimately to find a point in the circumference of a circle outside the vehicle in 3D... Could it be done solely using line traces aimed at a hidden cylinder / sphere / mesh surrounding the vehicle etc?
                            Last edited by ClavosTech; 12-06-2019, 08:38 AM.

                            Comment


                              #15
                              Originally posted by N-1-K_01 View Post
                              ClockworkOcean But I want to extend this formula from 2D into 3D...
                              Yup, good luck with that!...

                              Comment

                              Working...
                              X