I am working on a game that has some vehicle weapons that will track locked on targets. To add some realism, I am making it so that the angular velocity of the target (relative to the player/attacker) affects the success rate of the automated weapon.
Let us assume for right now that the speed of the projectiles the attacker is shooting at the target is not important for our calculations (consider instant for now)… only the ability of the gun to swivel fast and accurately enough to keep up with the target is important for now. Also, let us ignore how fast the target is moving towards or away from the attacker.
Additionally, this need to take into effect the rotation of the player as well. If the player turns away from the target as the weapon is trying to home in, this should add to the relative angular velocity of the target. Also, just to be clear, we are looking for how fast a target APPEARS to be going relative to the attacker, not actual velocity (far away would appear slower, point blank would appear much faster).
I am new to 3d game design and this is a little outside of my skill level. Thank you for any assistance you can give.
TL;DR - Need to calculate perceived angular velocity of target relative to player angular velocity.