var arr = new object[(int)Mesh.ArrayType.Max];
Vector3[] vertexs = new Vector3[]{
new Vector3(-1, -1, 0),
new Vector3(1, -1, 0),
new Vector3(1, 1, 0)
};
int[] index = new int[]{
0, 1, 2
};
arr[(int)Mesh.ArrayType.Vertex] = vertexs;
arr[(int)Mesh.ArrayType.Index] = index;
var meshrid = VisualServer.MeshCreate();
VisualServer.MeshAddSurfaceFromArrays(meshrid, VisualServer.PrimitiveType.Triangles, new Godot.Collections.Array(arr));
var ins = VisualServer.InstanceCreate2(meshrid, GetWorld().Scenario);
SpatialMaterial mtl = new SpatialMaterial();
mtl.ParamsCullMode = SpatialMaterial.CullMode.Disabled;
mtl.AlbedoColor = new Color(1, 0, 0);
VisualServer.InstanceSetSurfaceMaterial(ins, 0, mtl.GetRid());
I mean, after using the above sample code to draw a mesh(for some reason I don't want to use meshinstance for drawing), I can't use the instances_cull_ray function to query the mesh that I just drew. Is there any other interface that can easily implement the function of click query?