Move with mouse click and/or holding mouse (replicated)
I am still pretty much starting with all the stuff, but I seem unable to figure this basics out. I already got that part of character moving when holding mouse button down and following cursor.
Now I need to somehow detect just a click and move the character with pathfinding to a target location till some different input comes in. I have tried the following.
I tried to use "Add Movement Input", but character only "twitches" slightly, but it's not moving constantly. I also read somewhere, that "Simple move to Location" isn't working when triggered on client, because nav mesh is not replicated.
Unfortunately the Epic top down project template uses Move to Location which does not support network play. The trick to getting what you want is setting up an AI Controller on the server for each player controlled characer and then respond to click events on the client side in the Player Controller. Send those click events to the server where you can then set the move to location that the AI Controller uses to move toward. That is the basic idea. Let me know if you have questions about any specific part. I have set up a few projects this way and it works really well.
answered Dec 04 '16 at 01:46 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here