I have a top down game made from scratch. I need the player to always be moving towards the mouse. I tried a couple of things to no avail and I tried looking at the top down project, but I just don’t understand it. I feel so dumb because I can set up normal movement with arrow keys and the likes so easily, but I can’t figure this out.
Hi! For first, read guides and documentation. All information there.
You need this:
Event Tick → Get Hit Result Under Cursor By Channel → Location
After that just say to your pawn with AI controller Move to Location.
And if he doesn’t move, check this setting in pawn: Auto Posses Ai. Set it to Placed in the world or Spawn.
And don’t forget to use NavMeshBoundsVolume on your level
I did that exact setup and it didn’t work. the player would move towards the mouse for the first second and then just go in a straight line forever. Also, I did try to find documentation on my question and even scoured youtube and could not find anything on how to do it properly.
That did work. Apparently I forgot the nav mesh and I am disappointed in myself.