The Title is pretty much the question. Currently my Ray seems to shoot forward if I’m moving forward and backwards if i’m moving backwards. Here is what I currently have.
var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if(Input.GetButton("Fire1") && Physics.Raycast (ray, hit, Range) && health > 1 && time > 0.25) {
//Shooting Code is here
}
I assume at some point it would be .forward but that doesn’t seem to be working.
Any help would be great.