Initiate RayCast From Center of Camera?

Hello,

How would I go about Initiating a ray cast from the center of the screen (camera). Right now I am initiating from the mouses position:

function Update () {

    var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
    var hit : RaycastHit;
    if(Physics.Raycast (ray, hit, 500))
        Debug.DrawLine (ray.origin, hit.point);
        var objectTouching = hit.collider.name;
        print(objectTouching);
        currentObjectOver = hit.collider.gameObject;

}

Thanks,

Ollie

 var ray : Ray = Camera.main.ViewportPointToRay (Vector3(0.5,0.5,0));   
        var hit : RaycastHit;
        Physics.Raycast (ray, hit);

Vector3(0.5,0.5,0) uses x = 0.5 and y = 0.5 because Viewport vectors are normalized(which means they take value from 0 to 1). So, it will be the middle of camera viewport.

It's quite easy since that's the "normal" way to raycast:

var cam : Transform = Camera.main.transform;
if(Physics.Raycast (cam.position, cam.forward, hit, 500))

or if you need the Ray use:

var cam : Transform = Camera.main.transform;
var ray = new Ray(cam.position, cam.forward);
var hit : RaycastHit;
if(Physics.Raycast (ray, hit, 500))