Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desync when changing owner #3959

Open
M3rgi1 opened this issue Dec 23, 2024 · 0 comments
Open

Desync when changing owner #3959

M3rgi1 opened this issue Dec 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@M3rgi1
Copy link

M3rgi1 commented Dec 23, 2024

Describe the bug
2 Spheres with NetworkRigidbody with Sync Mode Client to Server and Spawned with Autority to Player 1.
Player 1 applys force to one of the spheres and waits until all spheres are still.(They can collide among themselves).
Then on the Server the Authority of all Spheres is removed and assigend to the 2 Player. While doing this sometimes(not always aproximatly every 3-5 time) the positions of the sphere got out of sync. And on the Client that not owns the sphere the spheres are at exactly twice the position they should be.

[IMPORTANT] How can we reproduce the issue, step by step:
Create a base Multiplayer Project with Network Manager. Create a sphere with network Idendity, NetworkRigidbody, Rigidbody, sphere collider. And make it a Spawnable Prefab. Have 2 Clients with a Network PlayerController that can apply force to one of the Spheres if its his turn. Spawn the Spheres with authority of Client 1. Than Client one should ad force to his sphere. Then Remove The authority from both Spheres and assign Client to to have Authority about the Spheres. That leads to the spheres be out of sync.
In my use case its a turn based minigolf game where i want to calculate each turn on the actieve Player.

Expected behavior
Expected would be to change the owner of the spheres without the position get out of sync and beiing double the original on one of the clients

Screenshots

Desktop (please complete the following information):

  • OS: Windows
  • Build target: standalone
  • Unity version: 6000.0.30f1
  • Mirror Version: 89.8.0

Additional context

@MrGadget1024 MrGadget1024 added the bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants