Alternatively, if what you're looking for is to stop the camera pan unless the enemy is within range then that's another story and is actually simple to do via code