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

Cannot Tween the region_rect of a Sprite2D #34575

Closed
acedogblast opened this issue Dec 24, 2019 · 3 comments · Fixed by #36411
Closed

Cannot Tween the region_rect of a Sprite2D #34575

acedogblast opened this issue Dec 24, 2019 · 3 comments · Fixed by #36411

Comments

@acedogblast
Copy link

Godot version: 3.1.2

OS/device including version: Linux x86_64 bit

Issue description: Cannot Tween the region_rect of a Sprite using either interpolate_method() or interpolateproperty()

Steps to reproduce: Create a Sprite and Tween node. Add script to root node:

extends Node2D
func _ready():
        $Tween.interpolate_property($Sprite, "region_rect", $Sprite.region_rect, Rect2(0,0,0,0),5.0 , Tween.TRANS_LINEAR, Tween.EASE_IN_OUT, 0.0)
	$Tween.start()
	yield($Tween, "tween_all_completed")
	pass

Minimal reproduction project:
project

@acedogblast acedogblast changed the title Cannot Tween the region_rect of a Sprite Cannot Tween the region_rect of a Sprite2D Dec 24, 2019
@volzhs
Copy link
Contributor

volzhs commented Dec 24, 2019

image

E 0:00:00:0445   Invalid param type, except(int/real/vector2/vector/matrix/matrix32/quat/aabb/transform/color)
  <C Source>     scene/animation/tween.cpp:1004 @ _calc_delta_val()
  <Stack Trace>  Node2D.gd:4 @ _ready()

for further information, Tween.interpolate_property seems not to support for Rect2

@Jedi18
Copy link

Jedi18 commented Dec 24, 2019

Can I be assigned this issue to add support for Rect2 for interpolate_property?

@volzhs
Copy link
Contributor

volzhs commented Dec 24, 2019

go ahead 👍

@Jedi18 Jedi18 removed their assignment Feb 19, 2020
Janglee123 added a commit to Janglee123/godot that referenced this issue Feb 23, 2020
@akien-mga akien-mga added this to the 4.0 milestone Feb 23, 2020
akien-mga pushed a commit to akien-mga/godot that referenced this issue Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants