Right now when i hit something with my raycast, it just tells me what it is... what i want the raycast to do is if it hits a rigidbody, make that rigidbody fly off as if it were hit by a bullet. thanks!
function Update()
{
if(Input.GetMouseButton(0))
{
var forward = transform.TransformDirection(Vector3.forward);
var hitInfo : RaycastHit;
if (Physics.Raycast (transform.position, forward, hitInfo, 1000)) {
print(hitInfo.collider);
}
}
}