Hello everyone,
I’ve been designing my game as a non-authorative network game, but ran into some problems that I think can only be resolved by making the host semi-authorative.
The situation in a nutshell:
Each player is responsible for their own spawning. Players can walk around and shoot each other and buildings. When a player hits a building an RPC call is made to check that building’s HP. When that reaches 0, the building is Network.Destroy()'d and replaced by a Prefab containing chunks. These chunks are given a Convex Mesh Collider, RigidBody and NetworkView Component at runtime. After 10 seconds, 2/3 of these chunks are Network.Destroy()'d.
The problem:
While the mentioned Components are indeed added to each chunk, their location and rotation don’t get updated (even though the NetworkView is targeting the Transform Component). Testing over LAN, someone could move a chunk into the river, and that same chunk would lie 100m further away for me. Also, some chunks start moving vigorously, as if they don’t know where to go.
After 10 seconds, 2/3 of the chunks are destroyed for each player, resulting in 0 chunks left to play with.
I’ve tried some messing around with if(Network.isServer)and trying to only get the server to do the chunk-destroying, but I’m afraid I’m in over my head with this for now. As the deadline for this project is fast approaching, I’d love any and all help I could get.
What would be the best way to solve this issue?
Thanks in advance,
Patrick Boelens