Hi,
I’m trying to make a system where players can take an item. I’m using PhysicJoints for moving. The server makes a decision about what player can take an item (if both of them trying to do it in the same tick). For the interpolated player, everything looks good. But if the player is predicted, the connected item is delayed. It’s because the item is interpolated and the joint wasn’t replicated.
The question is: how to make it works?
- I know that I should change the item to be predicted (there is an example, I know)
- Should I create a joint on the client side, right? Joints for the predicted client are supported?
- How to create a joint for the predicted client?
3.1 Joint should be created only if the server decides that it should be created. Some delay is acceptable.
My idea:
On the server, I have information about the joint entity in the player’s and the item’s component.
For one of their component, I can add a replicable component with the connected entity. The joint entity is local (is not a ghost). Next, create a joint if is not created and a connected entity exists. And destroy if exist and a connected entity doesn’t.
Or create a ghost joint entity.
I hope you can help me understand how to do it best.