The code to wrap the hex tiles around the camera works in the editor, but doesn't work in game.
I'm think it has something to do with getting the NodePath of the cameraRig, because in the debugger, I'm getting this error:
E 0:00:00:0372 get_node_or_null: Can't use get_node() with absolute paths from outside the active scene tree.
<C++ Error> Condition "!data.inside_tree && p_path.is_absolute()" is true. Returning: nullptr
<C++ Source> scene/main/node.cpp:1550 @ get_node_or_null()
This is the code for setting and getting the cameraRig:
void setCameraRig(NodePath p_nodePath) { cameraRig = Object::cast_to<Node3D>(get_node_internal(p_nodePath)); }
NodePath getCameraRig() {
if (cameraRig != nullptr) {
return cameraRig->get_path();
} else {
return NodePath();
}
}