Download

Trying to get Simple Move to Location to work for player "click to move" - so far it does nothing.

I’d like to have the player click then move to the clicked location but my Simple Move to Location doesn’t seem to do anything . I loaded up the top-down template and found it does the same thing I already have - I even stripped out all the unnecessary parts from the template and found it still functioned and mine does not despite it looking identical. I’m obviously missing something but I have no idea what.

911f31507af9da2902f6161a8210da786f0a7861.png

4e8abf601391ced303d7378bf655f3ceb35a0356.jpeg

Can anyone help me figure out why this doesn’t do anything?

The Simple Move to Location node is for moving within a Nav Mesh. Add a Nav Mesh Bounds Volume to your Level and make it large enough to encompass the entire area where you might want to click and move to.

Do you have a navmesh in your level? Im not sure if “Simple move to location” reqires it.
And i think you have to call that move function every frame. Right now its only called once when you click.

Regards

I have not really touched anything navmesh related. The template project doesn’t seem to have anything like that set up either (as far as I can tell). This is a screencap of the template project once I got rid of all the extra stuff (about touch controls, using a VR headset and updating cursor position)

DWBGn4X.png

It’s that simple, but if I do the same in my own project it doesn’t work.

I don’t know what a navmesh would look like but I don’t see anything like that in the example project. If I go to project settings > navigation mesh/system all of my settings are identical to the template project.

Edit: Oh wait, just found this … I see the template project does have one… gonna add it. If I don’t report back, it worked.

Edit2: Nope, even with the navmesh volume it didn’t work.

Edit3: I think I found something. When I’m running the template, I see this shows up in the world outliner:

9d7d3679c8688b15a507eda9dc29a38838a73f91.png

I do not have that in mine. So somewhere, an AI controller is being attached to the character (I guess?) which is allowing it to move. No idea where yet, still looking.

Edit4: I have migrated my character and controller to the template project and it functions there. This tells me the AI controller is not set up within the Player Controller or the Pawn. I checked the gamemode blueprint as well as the level blueprint to see if that was creating it but there’s nothing there. I also searched through all blueprints for “AIController” and found 0 results. So … I’m guessing the AIController is created due to an enabled option somewhere, possibly in project settings. The search continues.

Edit5: Ugh… I figured it out. I was trying to execute the navigation on a client. And by default, clients don’t have access to the navigation data. So I need to execute the navigation on the server. To recap, in order to use simple move to location, you need to create a nav mesh bounds volume that encapsulates your area and it needs to be executed on a server if in a multiplayer environment.

Ah ok. Glad it works now. :slight_smile:

Regards

Still one issue.

If I use the Server to execute a Simple Move to Location, the pawn moves at a normal speed.

If I use the Client to execute it, the pawn moves at about 1/5th the speed.

My logic is being executed clientside as follows:

LqtDMLN.png

So the executing client passes the coordinates to the server where the move is executed. Both the client and server are using the same controller, same character and execute the same code but for some reason the client is super slow. Any thoughts?

Edit: If I modify the Third Person Template to have two players, it does the same thing. I’m thinking I’m just using Simple Move to Location wrong in a networked environment…

Edit2: Ok, I guess it just doesn’t work for multiplayer. Sigh.

guys, the post is old, but my doubt is recent, I’m trying to configure the clients to walk with a click, but it’s not working, I’m trying this logic, can someone help me?

Wow, this post IS old! I don’t remember a ton about this but first thing I’d do is make sure the pawn is possessed by an AI controller. Then make sure there’s a navmesh in the map.

there is a navmash on the map, I need players to move their own characters by clicking, why would I use an ia for this?

If I remember correctly, these move actions can only be executed by an AI controller. You can always have your player controller issue commands to the AI controller (which is what I believe I did in the past).

Edit: Alternatively, you can use a node which I think is called something like “FindPathToLocation Asynchronously” or something like that which will give you an array of path points on the navigation mesh from point A to point B. Then you could use a loop to say if you are not yet at the next point, add movement input towards it, iterating through each point manually.

ok, i will try, thanks for the help

Hi, I’m not experienced in multiplayer, but recently I was trying something similar. For me player on client moves if I don’t use those branches with isLocalPlayerController. If I understand it correctly, event Run On Server really happens on server and then output of isLocalPlayerController is false (as it’s called from client). So on client it probably blocks for you on the branch in moveclick event.