Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | alanzulwas |
Its a dump question, but i dont get it how to use vector2 move_toward
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | alanzulwas |
Its a dump question, but i dont get it how to use vector2 move_toward
Reply From: | Bot7 |
I think that can help you https://m.youtube.com/watch?v=os8mF3kbVCE
i have watch this. but this is not code what i want
alanzulwas | 2020-12-30 06:22
but thank you
alanzulwas | 2020-12-30 06:23
Reply From: | alanzulwas |
I get the best answer. its …
# Moves to Vector(0,0) at a speed of 1 unit per second
var speed = 1 # Change this to increase it to more units/second
position = position.move_toward(Vector2(0,0), delta * speed)
so basically you are saying x and y you want to go to, and then the speed
the delta is … how many calculators/frames… (can’t remember which) but anyways it takes your speed / FPS to make it smooth