So I've created the hex map, however, I'm curious about how now I would extract the cursor position to a ground plane position, then select tiles which the cursor fall on top of? Does anyone know of resources/tutorials/documentation detailing how this is done?

Awesome, but now when I try to create a shape from the mesh, i get this error in terminal:

src/hexTile.cpp:68:30: error: 'class godot::Ref<godot::ArrayMesh>' has no member named 'create_convex_shape'
   _collisionShape = _hexMesh.create_convex_shape();
                              ^~~~~~~~~~~~~~~~~~~

Can´t really see how it could be related with the ray-casting though, but try posting your code here if you'd like. I haven´t used Godot with C++ though, so I probably won't be of much help there. ;)

It actually isn't related to ray casting, as I just found out I can use CollisionObjects to serve the same purpose I needed raycasting, and I don't have to then use code to calculate the hexgrid geometry. Here's the code:

/* --- hexTile.hpp --- */
  MeshInstance* _hexMeshInstance = MeshInstance::_new();
  Ref<ArrayMesh> _hexMesh = _loader->load("res://assets/meshes/hex.obj");

  CollisionObject _collisionObject;
  Ref<Shape> _collisionShape;
  int _shapeOwner;
/* --- hexTile.cpp --- */
void HexTile::_init()
{
  _collisionShape = _hexMesh.create_convex_shape(); // Throwing the error
  _shapeOwner = _collisionObject.create_shape_owner(this);
  _collisionObject.shape_owner_add_shape(_shapeOwner, _collisionShape);
}

Does it work if you declare _hexMesh as only an ArrayMesh and not wrapped with Ref<>? As I said, I haven´t used Godot with C++, so I don´t know the particulars, but that´s the only thing I could think of. Otherwise I´d say it should work! ;)

I need to wrap it in Ref<> so that godot is able to convert it from ArrayMesh to Mesh, as the compiler will throw errors saying that it can't convert "ArrayMesh to Mesh" for this line:

_hexMeshInstance->set_mesh(_hexMesh);

Upon getting the collision object method to work, frame rate dropped immensely. I've decided I should convert the hex map from a giant series of hex nodes with individual MeshInstance nodes attached to a multimeshinstance. Is there a way I could then extract the low level instances to attach a collision instance?

3 years later