Animate tint affecting wrong object if spawning on final (DEF-2748)


#1

I’ve came across a weird bug with animating “tint” and deleting and spawning objects. Apparently if you delete and spawn objects in the same frame, and try to animate the spawned object’s tint on init(), it doesn’t work properly and the objects’ materials get mixed up somehow. It gets even more obvious when both objects animate their sprites’ tint on init().

It’s a bit hard to explain, so I made a little example. Try doing: left-click, right-click, left-click, and you will see it. The red squares are supposed to animate their opacity.
Animate Tint Bug.zip (10.9 KB)

I didn’t do exhaustive tests, but animating scale works just fine, I think it’s just tint that’s an issue. Also, go.set(url, "tint", color) works fine, only trying to animate it messes up. Delaying the animation generally gets around the issue, but in my full game project it’s not a 100% functional workaround, possibly because I’m deleting and spawning other objects quite often.

This is probably closely related, or just a duplicate of these other bug reports: Go.animate('#sprite','tint',...) bug (DEF-2095), and Animation stops when another game object is deleted


Asteroids clone-ish
#2

If I don’t call go.set() and only do go.animate() in the script of object2 then it works as expected. Very strange indeed. I’m gonna talk to the rest of the team and see if I can figure it out.


#3

Created a ticket: DEF-2748


#4

Oh, I didn’t try that, so it does. Very weird. Thanks for looking into it!