FirstGearGames / FishNet

FishNet: Unity Networking Evolved.
Other
1.37k stars 147 forks source link

Graphical object offset wrong, should show as same offset position as it was set in prefab #582

Closed GhoShot closed 10 months ago

GhoShot commented 10 months ago

General Unity version: 2021.3.8f1 Fish-Networking version: 3.10.7r Discord link: https://discord.com/channels/424284635074134018/1189768212557086730/1189768212557086730

Description _graphicalObject Instantiated offset is on opposite side where it set in prefab, which can be fixed by reverse the calculation of SetTransformOffsets

Replication Steps to reproduce the behavior:

  1. Go to Assets/FishNet/Demos/Prediction V1/CharacterController/Prefabs/CharacterControllerPrediction.prefab
  2. Open prefab, set Capsule as graphical object in root predicted object component
  3. Move capsule a bit upper.
  4. Save , and run CharacterControllerPrediction.unity demo as host all right.
  5. Check this capsule position after player spawned.
  6. See error

Expected behavior Graphical object should show as same offset position as it was set in prefab, both position and rotation.

Screenshots before: beforesetting_20231228105207 before_20231228104639 fix: fix_20231228105532 after: aftersetting_20231228105619

FirstGearGames commented 10 months ago

Thanks for catch and fix. Resolved in 3.11.14 and 4.0.7.