BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

Lag Compensation is not work properly #142

Closed vladnau89 closed 4 years ago

vladnau89 commented 5 years ago

Describe the bug Lag compensation example from Advanced Tutorial is not work properly. The snapshot system does not have snapshot for passed frame yet. it always return previous frame snapshot

To Reproduce Steps to reproduce the behavior:

  1. Go to samples/AdvancedTutorial/scene/Level1
  2. Click on "Play As Server" from BoltScenes window
  3. Open Bolt.AdvancedTutorial.WeaponRifle.cs
  4. Add breakpoint to line 23. using (var hits = BoltNetwork.RaycastAll (new Ray (pos, look * Vector3.forward), cmd.ServerFrame)) {
  5. Add breakpoint to BoltPhysics.Raycast method
  6. Try to shoot from game scene
  7. compare the passed frame to BoltPhysics.Raycast method and last snapshot frame

Expected behavior The snapshot system always have a snapshot for passed frame on playable server at least.

Actual behavior The snapshot system always return previous frame snapshot( it is last snapshot)

Screenshots Paint 2019-10-01 00 08 41

Desktop (If applicable, please complete the following information):

Additional context

ramonmelo commented 4 years ago

Fixed on the next release.

Thanks for your feedback.