Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Krasapan |
How to shorten this code?:
$Sprite.position.x = 2
$Sprite.position.y = -3
I tried this, but it didn’t work:
$Sprite.position = (2,-3)
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Krasapan |
How to shorten this code?:
$Sprite.position.x = 2
$Sprite.position.y = -3
I tried this, but it didn’t work:
$Sprite.position = (2,-3)
Reply From: | Wurzelpilz |
$Sprite.position = Vector2(2,-3)
Your code does not know what to do with your (2,-3)
Codes are like toddlers, stupid, you have to tell them everything, in this case, you have to tell it’s a Vector2 and not something else.
I just forgot to add Vector2, thanks!
Krasapan | 2021-08-06 13:34