Raycasthit.point - same place every time! (Unity 3.5)

Hello. I’m trying implement a raycast shooting system for my FPS game. the problem is, everytime I try to instantiate a spark effect at the point of impact, it returns a location of (0,0,0) and creates the spark at that location no matter where I shoot it. Here is the relevent shooting code. Also, I am using Unity 3.5 (this may be the issue).
Please note that the rocket contains no problems, only the Gun type. The object this is attached to is a child of the camera.
Sickly code:

 case weaponType.Gun :
   var fwd = transform.TransformDirection (Vector3.forward);
   var hit: RaycastHit;
if (Physics.Raycast(launchpoint.position,fwd,range))
Instantiate(explosionPrefab,hit.point,transform.rotation);
print("this could not be more actual");
print(hit.point);
}
}

///////////////////////////////////
full code:

private var curReload = 0;
enum weaponType {Rocket, Gun, Melee}
var reloadTime = 0;
var projectile: GameObject;
var explosionPrefab : Transform;
var currentWeapon: weaponType;
var Speed = 30;
var range = 10;
var launchpoint : Transform;
private var countReload = false;
function Start()
{
curReload = reloadTime;
}
function Update () {
print(curReload);
print(countReload);
if ((Input.GetButtonDown("Fire1")) && (curReload == reloadTime))
Fire(currentWeapon);
if (countReload)
{
curReload++;
}
else
{
return;
}
if (curReload == reloadTime)
{
countReload = false;
}
}


function Fire(currentWeapon : weaponType) {
animation.CrossFade("Shoot",0.2);
countReload = true;
curReload = 0;
switch (currentWeapon)
{
case weaponType.Rocket :
var projed =Instantiate(projectile,launchpoint.position,transform.rotation);
projed.GetComponent(Projectile).speed = Speed;
break;
case weaponType.Gun :
   var fwd = transform.TransformDirection (Vector3.forward);
   var hit: RaycastHit;
if (Physics.Raycast(launchpoint.position,-fwd,range))
Instantiate(explosionPrefab,hit.point,transform.rotation);
print("this could not be more actual");
print(hit.point);
}
}

You never declare hit inside your Raycast, that should be the issue.

Sorry for the off topic, Unity 3.5 is released? (oh happy day!) :slight_smile: