0 votes

Basically, I have a small tween here made for a cutscene that makes a copy player sprite fall.
tween.interpolate_method($CutsceneStuff/Player, "position", Vector2(120, -56), Vector2(120, 90), 3, Tween.TRANS_LINEAR)
The thing is that it says that the target ($CutsceneStuff/Player) has no method called "position", even though it does (since it's a Sprite (extends Node2D)). Does anyone know why?

Godot version 3.5.1 (stable)
in Engine by (25 points)

I also made another animation but this time for the scale of the sprite, and it does the same thing (gives me an error saying that the node has no property called "scale" even though it does).
tween.interpolate_method($CutsceneStuff/Player, "scale", Vector2(1.2, 0.8), Vector2(1, 1), 0.5, Tween.TRANS_CUBIC)

1 Answer

+1 vote

position is a property, not a method. Use interpolate_property

by (8,097 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.