x

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"

Problem with trying to replicate my custom mouse rotation to all the clients

Greeting everyone!

I'm working on multiplayer FPS project with some custom mechanics for which i need custom mouse function. Problem is, mouse cam rotation works only on clients, but not on server, thus when client 1 rotates his camera angle, it is not showed to client 2 and client 2 sees client 1 as always facing forward.

Here's what i mean: https://1drv.ms/v/s!AmOWr-Yw7oVtgY8DjWXL9cuLG-y_eA

As shown in video, clients are not telling server that they changed view angle. This is my mouse function:

https://i.imgur.com/3xE7eaH.jpg

Initially i tried this replication method:

https://i.imgur.com/X3GYBYl.jpg

Basically i cast function to all clients and tells server that clients are using this function, and mouse-server event is refreshed on every tick. But it's not working.

Then i tried something else, i created replicated rotator variable and tried to expose it to server Here it is: https://i.imgur.com/lNqj49m.jpg

https://i.imgur.com/lNqj49m.jpg

It's not working, disables keyboard and mouse input, and just showed me this error: Blueprint Runtime Error: Accessed None trying to read property CallFunc_GetController_ReturnValue from function: 'MouseInput' from node: Branch in graph: MouseInput in object: BP_PlayerCharacter with description: Accessed None trying to read property CallFunc_GetController_ReturnValue

Basically i'm lost and i'm desperate for help.

I have tried multiple way to try and make it work and nothing, this is also in BP and the engine being used is the 4.18 any ideas or help would be greatly appreciated.

Thanks in advance.

Product Version: UE 4.18
Tags:
more ▼

asked Apr 22 '18 at 05:28 PM in Blueprint Scripting

avatar image

coolyer
1 1 2 4

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

1 answer: sort voted first

I do not see anywhere that is calling the Mouse-Server event. I think that would solve the problem if you call that event whenever the rotation changes on the client.

more ▼

answered Apr 25 '18 at 11:59 PM

avatar image

mightyenigma
3.8k 18 20 20

(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