how i send variables to host from client constantly?
in Fusion
Hello!, I have a question about how variables that constantly change in the client are synchronized and that they are reflected in all the other users? I tried to use the Networked attribute but this only works on the host side, if it is modified from the client nothing happens, I need to synchronize a float value that receives input from the user and sends it to the server, but I have no idea how to do that
0
Answers
-
Hi Lucas,
That's expected behavior, the host has authority over the state, so only the host can change networked properties.
The correct way of the clients communicate is with Inputs and some times RPCs.
So, in your case, you should use the input system to make the server aware of what the player is pressing/changing, and replicate/apply the change on the host side.
Please take a look at the Fusion 100 tutorial series and the Input manual page.
https://doc.photonengine.com/en-us/fusion/current/getting-started/fusion-intro
https://doc.photonengine.com/en-us/fusion/current/fusion-100/overview
https://doc.photonengine.com/en-us/fusion/current/manual/network-input
-----
Isaac Augusto
Photon Fusion Team
0