FirstGearGames / FishNet

FishNet: Unity Networking Evolved.
Other
1.39k stars 150 forks source link

Network Object Graphical Objects offset is wrong if inside of a nested nob #658

Closed AavaGames closed 5 months ago

AavaGames commented 7 months ago

General Unity version: 2022.3.9f1 Fish-Networking version: 4.2.2 Discord link: https://discord.com/channels/424284635074134018/1232695862074019910

Description The transform of the graphical object inside of a predicting NetworkObject has its local transform broken when the nob is nested underneath another Nob.

Parent nob: has network transform and is not predicting

Replication Steps to reproduce the behavior:

  1. Spawn a nob that is predicting underneath another nob
  2. Graphical objects transform is off
    • Placed at world zero with -90 Y rotation
  3. Drag predicting nob off of parent nob in hierarchy
  4. Works fine

Expected behavior The graphical object should follow its nob without an offset.

Screenshots Video located in discord link

FirstGearGames commented 6 months ago

I think this was resolved recently. I had noticed the code was a bit wrong when I added the option to detach the graphical. The code was corrected in 4.3.1; do you still have this problem in that release?

AavaGames commented 6 months ago

Yes I do except the problem has shifted from being everywhere to just being on clients and not the host. Now clients correctly have their own graphical object with them but all other clients characters still have a broken one with the graphical object starting at world zero. I added another video to the channel https://discord.com/channels/424284635074134018/1232695862074019910

FirstGearGames commented 6 months ago

I watched the videos and from what I gathered is maybe the NetworkTransform is not moving it where you expect. Are you setting the parent at runtime? If so, are you using nob.SetParent()?

FirstGearGames commented 6 months ago

Need more information on this please or will be closed out due to inactivity.

FirstGearGames commented 5 months ago

Closed due to inactivity.