4.3
I want to create an NPC that can detect the player, and try to walk towards them. Think of the Pokemon DS games where an NPC looks along the X or Y axis and then walks towards you and drags you into battle. That’s what I want. I’m brand new to coding/programming, so I’m pretty lost. I’m using raycast2D’s at the moment.
This is the code that I have currently, but I don’t know where to go from here to actually have my enemy walk towards the player. Any ideas would be greatly appreciated!