-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
I have tracked down a visual glitch to this update 028943b and may be relevant to this issue #1424
I was seeing sprites momentarily appear at the wrong position after setting visible=true despite also setting the correct xy at the same time. I noticed this was only happening on low power devices that had to skip frames to keep up. I also noticed that the wrong position was the last position the sprite had before visible was set to false.
The updateTransform optimisation added a _updateTransform bool, which gets set after the 1st update and this is then used to skip further transform updates within this update. the problem occurs on a slow device that is skipping frames on a subsequent state.update(), i made a sprite visible and set its position, the position transform is not updated but its visibility is picked up by the renderer - thus drawn at the wrong position.
As it is, this optimisation is unsafe, it needs some more work or removing.