I have a projectile, which is supposed to be firing in the direction of the camera. I’ve been trying for hours now but I still haven’t figured it out. I am very new to Unity and some help would be much appreciated.
Bullet.GetComponent ().AddForce (Camera.main.transform.forward);
The code above is what I’m using to Add Force in the direction of the camera. It adds the force perfectly fine, but not in the right direction. The force is being added directly upwards instead of towards where the camera is pointing. Could someone possibly tell me why this might be happening?