I've made a model programmatically using this:
Code:
H3DRes bbRes = h3dAddResource(H3DResTypes::Material, ("billboards/" + img + ".xml").c_str(), 0);
h3dutLoadResourcesFromDisk("assets");
H3DRes geo = h3dFindResource(H3DResTypes::Geometry, "models/button.geo");
H3DNode n = h3dAddModelNode(scene, (name + "MODEL").c_str(), geo);
h3dAddMeshNode(n, (std::string{name} + "MESH").c_str(), bbRes, 0, h3dGetResParamI(geo, H3DGeoRes::GeometryElem, 0, H3DGeoRes::GeoIndexCountI), 0, h3dGetResParamI(geo, H3DGeoRes::GeometryElem, 0, H3DGeoRes::GeoVertexCountI));
Before I used the above, I also tried generating the geometry myself, but in both cases, h3dutPickNode never returned the node, but what was behind it. It only seems to pick scenegraphs that were loaded with h3dAddResource.
I have checked, and no, the flags for the node were 0, so there was no NoRayQuery flag.