If you're using the physics behavior, you can apply a torque to the arrow to make it straighten out towards the direction it's moving.
This torque should be greater the faster the arrow is moving. So, if it's sitting on the ground, no torque. If it's flying fast, lots of torque.
You can use the "Apply torque towards angle" action to get this effect.
It would look something like the following:
Apply torque towards angle:
- Torque: 0.001 * arrow_speed
- Angle: arrow_movement_angle
(The "0.001" just scales the amount of torque used to correct the arrow angle. You can experiment with it.)
Of course there are no "arrow_speed" or "arrow_movement_angle" values by those names, so you'll need to calculate that information, but fortunately that's not too hard.
We can get the speed by finding the length of the Physics behavior's velocity vector. We get the angle by finding the angle of the velocity vector.
Apply torque towards angle:
- Torque: 0.001 * distance( 0 , 0 , arrow.Physics.VelocityX , arrow.Physics.VelocityY )
- Angle: angle( 0 , 0 , arrow.Physics.VelocityX , arrow.Physics.VelocityY )
This should make arrows fly head first, but will still allow them to topple end-over-end if they bounce off of something and lose most of their speed.
This is not a perfect simulation of arrow flight, as it doesn't account for linear off-axis forces resulting from the separate center of gravity, and center of pressure, but for it's simplicity it is pretty close.
I actually just uploaded an update of a game I made that uses this exact method for handling arrow flight.
ArcherOpteryx: http://gamejolt.com/games/archeropteryx/45519
(note: Firefox runs it a little slow, but every other browser, and the desktop version run fine.)
Hope that helps out <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">