How can i allow my turret to touch a moving enemy?

Hi,

I have a turret who fire when a enemy enter in it trigger. It fire in a straight line but don’t touch the enemy because they moving. I would like to know how can i do to “anticipate” his mouvement according to his speed and the distance between the turret and him.

it’s sounds complicated but i’m sure that there are a simple way to do that !

Thanks for your reading