Announcement

Collapse
No announcement yet.

Problem with Mouse function not replicating properly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with Mouse function not replicating properly

    Hi everyone, i'm facing some difficulties with replicating my custom mouse input function, in advance i'm sorry for my bad english.

    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. Any help would be greatly appreciated.

    Thanks in advance.
Working...
X