Mgccl

I got a sprite of an arrow and I need to rotate it because the arrow don't just fly out straight.

My idea is:

for any point where the arrow passes, find a tangent line's slope(which can be turned into a angle so I can rotate the sprite).

I have find the way of knowing x,y positioning of the arrow though this equation:

x(t) = vt cos(theta)

y(t) = vt sin(theta) - (gt^2)/2

Where v is the initial velocity, theta is the angle, t is the time and g is the gravity.

anybody know any idea to find a tangent line's slope for any t for the above equation?

My idea is:

for any point where the arrow passes, find a tangent line's slope(which can be turned into a angle so I can rotate the sprite).

I have find the way of knowing x,y positioning of the arrow though this equation:

x(t) = vt cos(theta)

y(t) = vt sin(theta) - (gt^2)/2

Where v is the initial velocity, theta is the angle, t is the time and g is the gravity.

anybody know any idea to find a tangent line's slope for any t for the above equation?