Rotating a projectile toward a target
Say I had a bullet a character shoots at an enemy. If the enemy was directly above me I want the bullet to be rotated at a 90 degree angle. Or if the bullet homed in on the target it should constantly point toward the moving target.
Can someone explain the math I need for computing the proper angle for the bullet?