I have a problem detecting the intersection of two PolyLines.
Well, the main goal is to compare the last X and Y with another PolyLine and find out if she is facing her intersecting with her.
There are data gaps associated with moving X and Y, so most of the time I cannot find X and Y in another PolyLine.
I think I should compare visualtree or something, not the data itself, but I donโt know how to do it.
<Canvas x:Name="LayoutRoot" Background="Black" Margin="2"> <Polyline x:Name="player3line" Stroke="GreenYellow" StrokeThickness="4" Points="146,106 141,106 136,105 131,105 126,105 121,106 116,108 112,110 108,113 104,115 100,118 96,120 92,123 88,126 84,129 80,132 77,136 74,140 72,144 69,148 67,152 64,156 " /> <Polyline x:Name="player4line" Stroke="Cyan" StrokeThickness="4" Points="85,113 89,116 93,119 97,121 102,123 107,124" /> </Canvas>
There should be an easy way to check if these two intersect?