my current problem is that it is possible for the server to simply walk on a collision box and have it updated so that its synced fine, however when the client tries to do the same he just gets stucks, can’t move at all until he jumps just to then get stuck again.
Shown here:
Server:
Client:
Any help? Been trying to google a solution for this for hours now.
There’s not really one “oh, this is absolutely what’s wrong” possibility here, at least not in a precise fashion.
But based on what you say about “server” versus “client”, I’m assuming that you’re testing this as a Listen server setup. I’d be curious what happens if you run it in a Dedicated Server mode; my suspicion is that you’ll see both clients get ‘stuck.’
If that’s the case, it’s very likely that you’re doing something somewhere in your code as the player which requires authority to perform.
To boil this down slightly, there are really three “roles” something can be filling in terms of multiplayer:
The Authority is who gets to say what reality is. When running single-player, the game is the authority. When running in Listen Server mode, the hosting player’s game is the authority. When running in Dedicated Server mode, the dedicated server is the authority.
An Autonomous Proxy is a client who is not the authority, but does “own” a specific character; autonomous proxies are usually going to ask the server to do things (“I would like to jump now”) and try to predict the results (“I have asked the server to jump, I will assume I’m about to jump”). If you aren’t the hosting player, then your character on your own screen is an autonomous proxy.
A Simulated Proxy is a representation of something on a client which is not owned by them. Simulated Proxies are generally going to just blindly do whatever the server said they did. In multiplayer, if you’re not the host, everyone else’s character is a Simulated Proxy on your screen.
If you are trying to do something which requires being the Authority, but are doing it as an Autonomous Proxy, it’s not going to work. In the scenario where you’re running as a Listen Server, the player who is hosting is the Authority, meaning their copy of the game can do whatever it wants. However, the client is an Autonomous Proxy, meaning it needs to ask the server to do things on its behalf.
This is what I mean by it being hard to say what’s wrong here precisely, because it’s probably whatever you’re doing when they land on that collision box. Are you changing the actor base? Are you saving off some sort of variable (“standing on fighter jet” or whatever) which isn’t being set on the server? Etc.
You can confirm this by changing to Dedicated Server mode, where both clients will be Autonomous Proxies, and a dedicated server is running in the background. If both clients get stuck when they jump onto the plane, then it’s almost certainly that you’re not doing something as authority which you need to be doing as authority.