0 votes

I want my character must move from block to block and can't free move
block size : 32x32
this is an example of my question

Godot version v3.4.4.stable.official [419e713a2]
in Engine by (12 points)

1 Answer

0 votes

If you say moving from block to block, it sounds like you are looking for grid based movement! I hope I understand correctly.
Godot has an internal grid snap that you can turn on and off as you wish, and you can set it to 32x32 pixels.
You should find plenty tutorials on the matter if you look for "grid based movement".

There's this resource called kidscancode. They have an immense number of helpful code snippets and explanations, this might help you with general movement:
http://kidscancode.org/godot_recipes/2d/grid_movement/
This person uses it in his video, and also enables grid snapping so you can see how it looks like:
https://youtu.be/HmnwNadwHWI

Now, your title sais click, and if you are looking for point and click based movement, this guy has a very understandable tutorial: https://youtu.be/5bxys-Zo_jk

I hope any of these resources are helpful!

by (18 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 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.