The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

me and my friend are making a game with a combat system close to pokemons. so I was wondering if there was a function that takes x,y cordnates and moves a character to said cordnates.if not is there a way to do it

in Engine by (34 points)

1 Answer

0 votes

There are two solutions depending on what you want:

  • Inmediate change: just code node.translation = newTranslation
  • Read interpolation in Godot and learn how to do
    I'm sorry if I don't develop code here, but you can visit documentation.
by (255 points)

Thanks for the help but it’s not what I’m looking for

If you are looking for a built-in function to do so, I don't know if it exists. With the documentation above you should be able to create yours according to your expectations. Otherwise, you can edit your question and add more information. Also lerp function might be useful, see here

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.