I need help with 3D Gridmap based movement

Godot Version

Godot 4.5 stable

Question

How can I set my player's position to the center of a Gridmap cell ?

I’m currently developping a game where my player moves relative to the tiles of a gridmap 3D node.
The problem is that my player is placed at the top corner of the cell, and not its center.
How can I do to center the player relative to the cell ?

Here is my player code :

You could add 0.5 to your position after editing

position += Vector3(0.5, 0, 0.5)

Make sure to paste code instead of screen shots

1 Like

Than you very much ! Indeed it was so simple ;D …
And thank you for the tip about the code !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.