ScreenToWorldPoint not working correctly

Upon giving a Line Renderer the following code, the renderer draws a line from the weapon origin to the camera instead of from the weapon origin to the actual position I'm attempting to make it point to. Something makes me think this is a very minor error on my part, but any ideas?

var originref : GameObject;
var lr : LineRenderer;
var crosshair : GameObject;
var cam : Camera;
function Update () {
    lr.SetPosition(1,originref.transform.position);
    lr.SetPosition(0,cam.ScreenToWorldPoint(Vector2(crosshair.transform.position.x * Screen.width,crosshair.transform.position.y * Screen.height)));
}

You line renderer should be set to use World Space.

Edit: I think you need to do a raycast from your camera to identify your target. http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html

Something like:

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit, 100)) {
    Debug.DrawLine (ray.origin, hit.point);
}

First, probably position 0 and 1 are maybe mixed up? Second, cam.ScreenToWorldPoint requires as a parameter a Vector3, but you just entered a Vector2 missing the z-coordinate.

Ben

I'll answer my own question. What I was doing was not taking the Z axis into consideration; as I only need it to point forward, setting it to cam.transform.position.z + 3000 (my camera's view distance) was more than sufficient. Here is the full code, for anyone who wants to know EXACTLY how this problem was solved.

var originref : GameObject;
var lr : LineRenderer;
var crosshair : GameObject;
var cam : Camera;
var lrpoint : Vector3;
function Update () {
    lrpoint = cam.ScreenToWorldPoint(Vector3(crosshair.transform.position.x * Screen.width, crosshair.transform.position.y * Screen.height,cam.transform.position.x + 3000));
    lr.SetPosition(0,originref.transform.position);
    lr.SetPosition(1,lrpoint);
}