This is something I've noticed time and time again, so I'm interested in how other people are handling this for their projects.
Our most recent example this this:
- We have a procedural sky actor in the level
- It has a dynamic day cycle that can be toggled
- Every client with permissions is supposed to be able to toggle it
So, the most obvious solution in my opinion would be:
- Create a "ServerAny" RPC on the sky actor, that takes the calling player controller and a bool
- Have the client call this
- Verify whether the calling client had permission to do this
- Update the sky state
However a ServerAny RPC does not exist in the engine, and no client owns the sky, so we have to resort to this nonsense:
- Add another RPC to the player controller
- Have the client call this
- Search for the sky on the server side and continue as above
Anyone have comments on this?
Our most recent example this this:
- We have a procedural sky actor in the level
- It has a dynamic day cycle that can be toggled
- Every client with permissions is supposed to be able to toggle it
So, the most obvious solution in my opinion would be:
- Create a "ServerAny" RPC on the sky actor, that takes the calling player controller and a bool
- Have the client call this
- Verify whether the calling client had permission to do this
- Update the sky state
However a ServerAny RPC does not exist in the engine, and no client owns the sky, so we have to resort to this nonsense:
- Add another RPC to the player controller
- Have the client call this
- Search for the sky on the server side and continue as above
Anyone have comments on this?
Comment