Thrown objects always have same rotation

I am trying to have the player throw a fireball prefab every time the left-mouse button is clicked. The fireball spawns and is thrown away from the player, however, it always goes the same direction. The rotation I give the fireball is that of the camera’s X and the player’s Y. I can’t seem to figure out why it is not using the correct rotation.


			GameObject temp = (GameObject)GameObject.Instantiate(fireBall, 
				 new Vector3(player.transform.position.x,


			temp.rigidbody.AddForce(force, force, force);

You don’t give us enough enough information/code to nail everything down, but assuming your fireball is facing the correct direction (i.e. your Quaternion.Euler() is giving you what you want), the last line is wrong. Here is an alternate:

temp.rigidbody.AddForce(temp.transform.forward * force);

the cause is That you are using the camera’s euler angles … By closely observing your game you can find out that the camera’s angles are constant that is the problem which is causing the issue. try using the player’s angles

if you found this helpful or if there is anything more that you would like to know pls post again.