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
Adding a tween with a duration of 0 leaves the object in an invalid state with NaN as the value and cannot be tweened afterwards, unless the value is explicitly set to a valid one.
NOTE: This works in 3.86.0 and prior
Example Test Code
Tweak the sprite alpha example to a tween and see the outcome. This might be happening with other values, but I haven't tested those.
When passing in dynamic values sometimes a 0 makes it's way down the chain. In a large codebase where this has worked for ages, it's a tricky one to track down. Either way, it shouldn't leave the sprite in a state where you cannot tween it back to a different value.
I'd like to chime in that I also encountered this unexpected behavior.
In my case i was tweening the x/y-coordinates, and the tween duration is dynamically calculated by measuring the distance between the current and the target coordinates, so the longer the distance, the longer the duration of the tween. In the case where the new coordinates are the same as the current coordinates, the duration is calculated as zero and the gameobject disappears.
Version
Description
Adding a tween with a duration of
0
leaves the object in an invalid state withNaN
as the value and cannot be tweened afterwards, unless the value is explicitly set to a valid one.NOTE: This works in 3.86.0 and prior
Example Test Code
Tweak the sprite alpha example to a tween and see the outcome. This might be happening with other values, but I haven't tested those.
Sandbox
The text was updated successfully, but these errors were encountered: