that's probably because the model is rotated. In order to get this to work well, i would recommend:
function Awake () //called when the arrow is instantiated, this is different than Start()
{
arrow.rigidbody.AddForce(player.transform.forward*speed, ForceMode.VelocityChange);
}
(also, because you weren't multiplying by Time.deltaTime before it may go really, really fast, so i recommend lowering the speed).
then you can apply gravity to the arrow so it lobs. The only other thing you would want to do is make the arrow's rotation arcs along the direction of motion, which you should be able to do by Quaternion.SetLookRotation(arrow.rigidbody.velocity) in FixedUpdate or Update (and later as a coroutine when you get better, unless you already know about coroutines);
↧