Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node disappears when animating a Tween with duration of 0 #40843

Closed
danielzting opened this issue Jul 29, 2020 · 1 comment · Fixed by #53003
Closed

Node disappears when animating a Tween with duration of 0 #40843

danielzting opened this issue Jul 29, 2020 · 1 comment · Fixed by #53003

Comments

@danielzting
Copy link
Contributor

Godot version:

v.3.2.2.stable.official

OS/device including version:

macOS Catalina 10.15.5 (19F101)
MacBook Air (Retina, 13-inch, 2018)
Intel UHD Graphics 617 1536 MB
Confirmed on both GLES2 and GLES3

Issue description:

Animating a node with a tween with a duration of 0 causes the node to disappear. I expected it to just animate instantly.

Steps to reproduce:

  1. Add ColorRect
  2. Add Tween and Timer under ColorRect
  3. Set Timer to One Shot and Autostart
  4. Attach script to ColorRect
  5. Connect Timer timeout() signal to the following code:
extends ColorRect

func _on_Timer_timeout():
    $Tween.interpolate_property(self, "rect_position", null, Vector2(100, 100), 0)
    $Tween.start()
  1. Play scene

Minimal reproduction project:

tween.zip

@KoBeWi
Copy link
Member

KoBeWi commented Jun 19, 2021

Still valid in 60dcc4f
Might be some bug with interpolaters. The easiest fix would be a special case for 0 time interpolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants