darceyo The function name in Godot 4.x is instantiate(). If you're following a 3.x tutorial do it in Godot 3.x. Otherwise you're in for more hidden surprises like this that'll just needlessly hinder your progress with the tutorial 😉

    xyz yes, it works! but i have another problem here 🙂

    is that possible to convert mouse position to vector 3 somehow? i think we need to add z axis somehow?

    • xyz replied to this.

      darceyo is that possible to convert mouse position to vector 3 somehow?

      What would that Vector3 represent?

        xyz so i have an GridMap on my main scene, i want to choose a cell at this position and place block there.

        • xyz replied to this.

          darceyo A 2D on-screen position can be projected to an infinite number of 3D positions because a point on a screen represents an infinitely long ray in space, going "into screen". You need some limiting factors to determine where that 2D point should actually be projected in 3D space. Having only x and y mouse coordinates is not enough.

            xyz ok, then what is the best way to get that cell i'm looking at and place the block here?
            because i already just don't have an ideas.

            • xyz replied to this.

              xyz GridMap have it's cells, right? so i want to use the camera to place block here.
              i think it's simple, but i can imagine it.

              • xyz replied to this.

                darceyo You need to use ray casting, but in order for it to work the meshes in the mesh library need to be set up so they have collision objects that can detect ray intersections.