So Im making a multiplayer game, and Im trying to make the player shoot a fire ball.That part is easy, however I dont want it to just shoot a fireball in a straight line forward, I want it to be that if whereever the player looks it will shoot a projectile at that angle. (Ex: If im looking 45 degrees in the air trying to shoot a bird or whatever, I want it too shoot at an angle not just forward in front of my player)
GameObject fireball = (GameObject)PhotonNetwork.Instantiate("Fireball",transform.position,transform.rotation,0);//Instantiate fireball
fireball.rigidbody.AddForce(transform.forward * 600); //make it move