SQF comes with:
_gunner doWatch (position _targetToFollow);
Try this one first and observe gunner shooting way in front of your position. Then remove the "position" command so it becomes:
_gunner doWatch _targetToFollow;
Now oddly the gunner shoots at your position. But lie down, and see the gunner aiming far left and right of you. If you stand up again, it will aim at you again. "doWatch" is not a visibility thing. According to notation it should only observe the position.