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"

Why can't I seem to replicate the lookRotation to the Server?

I am using a listen server and it seems that lookRotation is replicating from the server to the client, but not from the client to the server. I am probably overlooking something.

Edit: Added current blueprint nodes. alt text alt text alt text

Product Version: UE 4.10
more ▼

asked Apr 02 '16 at 08:15 PM in Blueprint Scripting

avatar image

1 1 5 6

avatar image pythonxz Apr 06 '16 at 01:24 AM

I just did a test on the second branch of the sequence shown in the first image. I a did simple increment of the yaw rotation in place of the GetControlRotation. It replicated on both the client and server just fine. Something is either wrong with GetControlRotation, or I'm overlooking something.

avatar image pythonxz Apr 06 '16 at 01:56 AM

This is the example which I'm basing my implementation off of.

alt text

example.png (288.7 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Server replicates to clients automatically but clients don't do the same. If you want your client to tell your server to do something you need something called RPC (Remote Procedure Call). Basically what you need to do is Add a Custom Event and in the replication section you need to select the Run On Server option, then connect the nodes that you want the server to execute, branching off of this event. This way if you are a client and you call this function, it will travel to the server and it will do it for you.

more ▼

answered Apr 03 '16 at 03:53 AM

avatar image

600 17 9 33

avatar image pythonxz Apr 03 '16 at 03:46 PM


You helped me on my previous question, so you should know that I'm aware of RPCs. I have tried using a Run On Server RPC, and that doesn't seem to replicate the rotation.

In the image above, it shows a method which has allowed me to replicate the rotation from the server to the client, but not the client to the server. I had another method which was similar, but used a Multicast RPC instead of the replicated variable. It, however, has the exact same result.

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

So, today i made system for stuff which you asking, replicate rotation from client to server. I use it to make "look at mouse cursor" behaviour.

When I need to change rotation, i call RPC on server which set up required rotation as variable. This variable is RepNotify and since it changed on server, its getting replicated to all clients and change can be detected in OnRep_ function generated for variable. Another variable is current, local character rotation. Timer is looping and this function update rotation smoothly between server required and current client.

more ▼

answered Apr 03 '16 at 05:19 PM

avatar image

1.2k 57 21 57

avatar image pythonxz Apr 05 '16 at 01:08 AM

I've tried to do what you you've shown here, but I don't think that can work for normal mouse input rotation.

avatar image CriErr Apr 05 '16 at 05:58 PM

how does thats matter, you still trying to replicate variable from client to server and all other clients, how you use that variable thats different topic.

avatar image pythonxz Apr 06 '16 at 12:22 AM

Either way, the most I can get to work is replicating the rotation of server to the client. The client's rotation will not replicate to the server.

avatar image CriErr Apr 06 '16 at 01:56 PM

You should revisit unreal blueprint networking documentation, you missing basic knowledge about networking. Very first screenshot shows how can you set variable from client to server.

avatar image iRYO400 Apr 06 '16 at 02:23 AM

I think I have the same issue. Cant send message from client to server about changed variables https://answers.unrealengine.com/questions/400186/top-down-advanced-joystick-controller.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