Open nbenven95 opened 5 years ago
Was able to rectify the second issue fairly easily. Just needed to add a check for the AI tank's current firing state (i.e. making sure they had a lock before they fired). However this brings up another issue where because the AI tank can only aim at the root of the player tank, they can't aim low enough to actually hit the player. So the AI tank's pathfinding acceptance radius needs to be made larger.
The AI tanks will fire at the player even if there is an obstacle (e.g. terrain) between them. Will need to use a raycast to fix this most likely.
When the AI tanks rotate their turrets to fire at the player, they sometimes fire prematurely. Will need to add an additional check in the fire control code that ensures that the AI tank has sighted the player tank before it fires.