- Home /
Question by
brockk · Jan 30, 2014 at 08:27 AM ·
projectiletrajectory
How can i move Arrow realistic way according trajectory projectile ?
i want to shoot my arrow with up direction as it's velocity increase and it shoud turn down as it's velocity decrease
Comment
Best Answer
Answer by sarthakshah · Sep 16, 2014 at 06:23 AM
Vector3 vel = arrowClone.rigidbody.velocity;
float angle = Mathf.Atan2(vel.y,vel.x)*Mathf.Rad2Deg;
print(angle);
arrowClone.transform.eulerAngles = new Vector3(0, 0, angle);
Answer by getyour411 · Jan 30, 2014 at 08:28 AM
This is a common question with many Google hits; please try a search before posting a generic question.
http://forum.unity3d.com/threads/40495-Help-with-shooting-arrows
just one of many via Google "unity arrow"
you post a forum thread to a different question tho. this guy needs his arrowhead to fly downwards after shooting. The one you posted is about a guy who can't get his arrow to fly the direction he shoots at.