0 votes

Its a dump question, but i dont get it how to use vector2 move_toward

Godot version 3.2
in Engine by (16 points)
edited by

2 Answers

0 votes
by (252 points)

i have watch this. but this is not code what i want

but thank you

0 votes

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

by (16 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 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 webmaster@godotengine.org with your username.