To emulate shooting arrows...any ideas?

I’m tring to make a 2D shooting game. Now I’ve got troubles when emulating the shooting.

I tried to set the rotation of the arrow object, and add velocity to it. However, the arrow didn’t perform as I need.

var arrow : GameObject=  Instantiate(arrowPrefab, arrow_pos, Quaternion.AngleAxis(15, Vector3.forward));

arrow.rigidbody.velocity = Vector3(dir.x * 10, 3, 0);

Any ideas?

Where are you calling

arrow.rigidbody.velocity = Vector3(dir.x * 10, 3, 0);

??

Why not just give it a starting velocity and rotation and then let gravity handle the rest?

You can say this to keep the arrow pointed towards its velocity: arrow.transform.LookAt(arrow.rigidbody.velocity + arrow.transform.position);