Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

alt text alt text (http://pasteboard.co/5iZCdxSHO.png)

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.

alt text

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.

Product Version: UE 4.14
more ▼

asked Dec 03 '16 at 10:19 AM in Blueprint Scripting

avatar image

Daniel K.
165 9 21 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Dec 04 '16 at 01:46 AM

avatar image

2.6k 62 27 281

avatar image Daniel K. Dec 04 '16 at 01:58 AM

Ok thanks, I have found this answer later on which does what you are speaking about. Feels rather dirty, but I guess no other way around :( https://answers.unrealengine.com/questions/34074/does-ue4-have-client-side-prediction-built-in.html

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question