Help with Point Click Movement Please

Alright so I am trying to make a movement system similar to old school RuneScape where the world is basically divides into a grid and your movement is between the tiles basically. I tried to use the basic structure from the top-down template for movement. The node “Simple Move To” is inaccurate as can be.

https://gyazo.com/3cdcb4e4b2e6941d10b424ee8f31708e

I have ready to use AI Controlelrs and I have tried but every time i try to set up Ai controller and everything I get a error : accessed non trying to read ai controller. In all honestly this will be multiplayer and I don’t know if making all the characters AI is the correct way to do this. All i want is to move to the exact location I want because I am converting my Mouse click locations to the center location of the tile clicked on and all that works perfectly. Just when I tell my player to go there it does not work.

I implemented point-click movement without a tile system, but I guess you might use a mouse cursor to hover over the tile and then use the tile center coordinates for your character

I am trying to do basically the same thing. I started with the third-person template though. Right now I don’t have any tile system setup but I am converting to the world location that is clicked to the neared “tile” center. From what I can see by turning the collision on is that mine is pathing to the location it is told and stopping once the collision box hits that location. It kinda of looks like what is happening in your link as well.

https://gyazo.com/69f2d7da5d5c88914773ea89fda314eb

I am not too sure how to stop that from happening or how to position the character inside these tiles. Still got a lot to figure out I guess only started this 2 days ago.

I ended up figuring it out.

You need to not use the “simply move to” node.

Same set up The grid is just visual. I convert to Tile center based on mouse hit from hit under mouse cursor on lmb. My player is only controlling his camera pawn that is the red sphere outline you see. I then pass through input data such as clicked tile location to my “unit” or could be your character or whatever. I then bind my cameras sphere I use to anchor my camera in my camera pawn to the location of the unit or character. From there In the Character/Unit Ai blueprint I have custom event to move to location. I put my acceptable radius to 0 and false on stop on overlap meaning it will go to location and not stop once collision hits the location.

I then call that from my player controller when I click to move by casting to the character/ai unit and then calling the move event i create.

1 Like