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

Synced properties on proxy clients sometimes do not reflect value on the network owner #7275

Open
trundlr opened this issue Dec 29, 2024 · 0 comments

Comments

@trundlr
Copy link

trundlr commented Dec 29, 2024

Describe the bug

In Grubs, we have run into an issue while playtesting:

  • Players join
  • The game starts
  • Grubs are spawned
  • The [Sync]'ed public Vector3 Velocity { get; set; } is equal to {0, 0, 0} on the host, since the Grub is not moving.
  • On other clients, we see an incorrect value on the Velocity, until the Grub moves.

This is annoying, because we check a Grub's velocity to determine if things are resolved, which lets us move safely to processing the damage queue and moving on to the next turn.

As a workaround, I have attempted to use the Query sync flag, in case somehow a stuck value just doesn't get set on other clients properly, but this did not fix the issue.

The value is still CORRECT on the owning client. But it is incorrect for other clients.

Here is a video of me reproducing the bug locally. The host owns Wormbert Jr, and the host shows the Velocity as 0. But the second instance sees Wormbert Jr's velocity as roughly (-5.6, 0, 0).

To Reproduce

  1. Clone Grubs on this branch https://github.com/apetavern/grubs/tree/player-system-improvements
  2. Use grub_count 16
  3. Add a second instance
  4. Repeat until you see a Grub moving when it shouldn't be
  5. Log the Character Controller's Velocity for that grub's name and notice the discrepancy on the synced value.

Expected behavior

Synced values are accurate, especially when using the Query flag

Media/Files

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant