Download

AI move to nearest player

My goal is to have an enemy that will constantly pursue the nearest player (may be multiple) and move directly to them (through walls). What is the best way to accomplish this?

I know that collision channels can be used to have the enemy see and move through walls, but it still seems to be pathing itself around walls with a MoveTo command. And I’m not sure how to have a reliable, constant check for the nearest player pawn.