I'm implementing a homing bullet that targets the nearest enemy.
I'm able to calculate the angle between the player's forward vector and the vector from the player to the target by doing a dot product. If I put the result to acos(), it will give me the angle between the 2 vectors in terms of radian.
Now I want my object to rotate and face toward the enemy as it is flying. But here comes the problem, how do I know which side to rotate to? I know the angle between the 2 vectors, but I dot producted value doesnt tell me whether or not the target is on the left side or right side of the player.
I'm wondering if I'm taking a longer route, and I might not be aware of a easier way to determine how much and to which side I need to rotate to face the target.