Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | pferft |
Hi everyone,
a certain button press instances a short animation-scene:
var little_anim = preload("res://xyz/cool-anims/nicelittleanim.tscn").instance()
add_child(little_anim)
Naturally the animation runs exactly on its set screen position.
Is it possible to have this same animation positioned in different spots by code? Adding a TWEEN doesn’t seem to work in such a case…
I’m not sure why you would need a Tween to set the position of the instance. Can’t you just do:
little_anim.position = Vector2(x, y)
?
exuin | 2021-09-17 17:35
It’s that easy!?
Thank you very much!
pferft | 2021-09-18 09:55