0

How can I calculate the angle of rotation/tilt of an arrow in 3D?

When I say angle I mean the angle the arrow takes when it flies through the projectile path.

I am using logic given in the below link to calculate the location in the 3D space

http://babek.info/libertybasicfiles/lbnews/nl130/proj3d.htm

and also OpenGL for rendering

yoozer8
  • 1,144
  • 2
  • 15
  • 30
Harry
  • 1

2 Answers2

3

Simplistically the arrow will always lie tangent to the curve described by its trajectory. The tangent to any curve is simply the derivative or the slope of the curve at the point of the tangent.

To calculate this take the inverse tangent of (y1-y)/(x1-x) and repeat for the other planes to get the 3 required angles in 3D. (y1 and x1 are simply y and x values one time or distance step in advance of y and x)

Tristan
  • 248
  • 2
  • 5
2

Take a look at this answer, remeber that in this case the 2D and 3D are quite the same thing since your arrow trajectory (probably) lies on a plane.

FxIII
  • 3,996
  • 20
  • 20