Alrecenk / JSTimelineSync

A quick and dirty prototype for testing generalized rollback networking.
MIT License
5 stars 1 forks source link

Multiple calls to getObserved can break interpolation #48

Closed Alrecenk closed 2 years ago

Alrecenk commented 2 years ago

getObserved relies on the last thing it returned for interpolation, but if you call it more than once for an object within a frame then it will affect the interpolation speed. This should not be the case.

As an example, I created bullets, that have a shooter id, and then then to draw them they fetch their shooter and duplicate its color. With a naive implementation this results in many calls to player's getObserved interpolation, completely defeating the point of interpolation. getObserved should not execute interpolation 8unless the time on he timeline has changed.

Alrecenk commented 2 years ago

Fixed.