draw line and detect the intersection line renderer clone

I’m drawing lines with the touch event but I need to detect the crossing of lines using line renderer this is my code:

function UpdateLine()
	{
	var mousePos3: Vector3 = Input.mousePosition;
	
		//currentPen = Instantiate(thePen, thePen.transform.position,thePen.transform.rotation);
	   currentPen.GetComponent(LineRenderer).SetWidth(0.2f, 0.2f);
	   currentPen.GetComponent(LineRenderer).SetVertexCount(linePoints.Count);
	  for(var i = lineCount; i < linePoints.Count; i++)
	  {
	    currentPen.GetComponent(LineRenderer).SetPosition(i, linePoints[i]);
	    
	  
	  }
	  currentPen.GetComponent(LineRenderer).materials[0].mainTextureScale = new Vector2 (linePoints.Count-1,1);
	  currentPen.GetComponent(LineRenderer).name = "Swipe";
	  lineCount = linePoints.Count;
	  
	  var hit2 : RaycastHit;
		var ray2 = Camera.main.ScreenPointToRay (mousePos3);
	  
		  if (!Physics.Raycast (ray2, hit2, 10000))
		  	
			return;
 
		//we've hit a sphere
		if(hit2.transform.gameObject.name == "Swipe")
		{
		
			Debug.Log("Hit the line");		
		}
	}

currentpen are my clones line renderer.

I need to hit between line renderer, I’m newbie and sorry for my English.

You will have to use some simple geometry.
http://lmgtfy.com/?q=Find+where+two+lines+intersect

can you give me an example about geomtry apply in line renderer gamobject unity?

If you look at the link it provides googles array of answers for this exact question.

If you look, there is a video, on the age about 3 hits in. Follow that exactly.

For your case, you will have 2 points per line. That is more than enough. Just come up with some equation.

You basic line equation is y=mx + b where m is the slope, rise and run, something you have, and b is the y intercept. Google around a bit.

So I have been racking my brain trying to figure this out, but I can not find an answer. Sorry. This situation is different from the examples I read, since you know factors but dont know others. It is an interesting question tho and I would love to know if someone else knows.

Good luck mang.

thanks dude for your answers