You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an error in drawing billboards that are clamped to ground when their position updates a whole bunch. billboard.position will have the correct position, but the billboard will occasionally jump around on the screen when you zoom in and out.
@mramato suspected there is a race condition somewhere in our clamp to ground computation. The position value might change while clamp to ground is being computed, and it ignores the change.
So, with some investigating, I think I figured out what is happening:
Billboard calls QuadtreePrimitive.updateHeight whenever the position is changed. This adds a callback function to every tile, so when that tile is updated it update the billboard. QuadtreePrimitive.updateHeight returns a function to remove the callback. Billboard calls this remove function every time the position changes. So there theoretically shouldn't be updates made based on outdated positions,
However, I don't think the callback is being removed from every tile it was added to.
When the remove function is called, it appends to the QuadtreePrimitive._removeHeightCallbacks list, which is used in selectTilesForRendering. I don't think the loop that removes the callbacks loops through all of the tiles it was added to
As a result the billboard's callback to update the position is called with the wrong data
And this is where I'm stuck because I don't know how to fix the loop so that it removes the callback from all the right tiles. @bagnell?
There's an error in drawing billboards that are clamped to ground when their position updates a whole bunch.
billboard.position
will have the correct position, but the billboard will occasionally jump around on the screen when you zoom in and out.@mramato suspected there is a race condition somewhere in our clamp to ground computation. The position value might change while clamp to ground is being computed, and it ignores the change.
@bagnell any ideas?
Here's an sandcastle example for reproducing the bug:
The text was updated successfully, but these errors were encountered: