Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

Ownership change breaks interpolated fields #220

Open
adrianhoppe opened this issue Jan 21, 2019 · 2 comments
Open

Ownership change breaks interpolated fields #220

adrianhoppe opened this issue Jan 21, 2019 · 2 comments

Comments

@adrianhoppe
Copy link

Version Number and Operating System(s):

Master Branch commit 8d131e0 (latest as of today)
Unity 2018.3.0f2
Windwdos 10

Expected behavior:

When ownership changes, interpolated field variables of a networkObject are identical on both the new owner and other connected clients.
Non-interpolated fields work as expected.

Actual behavior:

The variable on the non-owner client is unequal to the value on the owner. However, Interpolation.current holds the correct value from the owner.
See my post on discord (forge-bugs @ 18.01.2019 15:03) for a little more information.

Steps to reproduce:

  1. Setup TestOwnerSwitch with the Forge Network Contract Wizard with a field rotation - Quaternion - Interpolate Checked - 0.15 and another field rotationNoInterp - Quaternion - Interpolate Unchecked
  2. Create a script named OwnerSwitchTester.cs with the content of the attached txt file.
    OwnerSwitchTester.txt
  3. Setup a forge networked game with two clients and spawn one GameObject with the OwnerSwitchTester script attached to it on the server.
  4. Try either case:
    4.1 Press 1 on the client, then press 2 on the server.
    4.2 Press 2 on the client, then press 3 on the server.
  5. The output on the client shows a wrong value for rotation = ... on the non-owner client. The interp = and rotationNoInterp = ... values are correct.

p.s. I use Log Viewer from DREAMMAKERSGROUP from the unity asset store to show the output log of a build game.

[Optional] Discord Username:

Adrian_H

@phalasz
Copy link
Contributor

phalasz commented Apr 17, 2019

Would it be possible to proved a simple project that reproduces the issue @adrianhoppe ?

@adrianhoppe
Copy link
Author

Hey,
sadly right now I am very busy with work and won't be able to provide you a minimal working project.
The project where we found the issue is way too large to strip down. However, I hope that the steps to reproduce are detailed enough to replicate the issue.
Best,
Adrian

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants