decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

Tweens from current position #1130

Open nearnshaw opened 1 month ago

nearnshaw commented 1 month ago

Idea proposed by Will Caine

PROBLEM

The one thing we noticed was a possible drift/race condition between the tween and the proto buffer since our system was replacing the tween every frame. We gave it the last known Transorm.position as the start point however at times would jitter backwards almost as if the Tween system moved one frame forward before the protobuffer sent in our new request. The theory is there is a lag between protobuffer and the true Transform.position and the tween system that kept moving it before it recieved the new protobuffer msg.

IDEA: Add a feature to the Tween to support startPosition as "current position" to remove the risk of the race condition between true Transform position and Tween system. The Tween system would just take current position as its new start point and remove the jitter