Got two surfaces on my map mesh assigned to some faces on the geometry. I am able to get the specific face IDs on the mesh, so what can I do to get the surface assigned to that face? Any help is appreciated!

    wontairr What do you need this for?
    Btw faces are "assigned" to surfaces, not the other way around.

      xyz Oh my bad.

      Basically, I'm trying to have impact effects/sounds that change based on the surface material of whatever my bullet hits.

      So if its sand, dusty sound, wood, splintering sound, etc.

        wontairr use different physics objects.
        Your meshinstance is visual only, your collisions happen on a physics object that has a collider. You need 2 different surfaces, use two different physics objects with 2 different colliders.
        And while you're at it, put all the colliders sharing the same properties on the same physics objects, that way you have fewer physics objects with the same number of colliders.
        Ex:

        Wall staticbody
             |
             Wall 1 collider
             Wall 2 collider
        
         Floor staticbody
             |
             Floor sand
        
         Floor staticbody 2
             |
             Floor concrete

          Jesusemora Sorry, I should've mentioned I'm using trenchbroom with qodot. It makes the map a single staticbody with separate colliders for each part of the map (brushes).

          I am able to get the specific face ID I shoot at on the mesh through some functions, so If I can get the surface that face is assigned to I can do the proper effects based on that.

          5 days later
          a year later

          wontairr I love this and it worked great accept I had to set

          var texture_name = parts[15]

          in the "func get_map_brush_info():" because my map brush structure was like this ->

          ( -48 160 32 ) ( -96 112 16 ) ( -96 256 16 ) grass [ 0 -1.0000000000000002 0 16 ] [ 1.0000000000000002 0 0 16 ] 0 1 1

            yelfog I tried wontairr's solution, but get_map_brush_info() is returning "{ "0": [] }" and I'm getting nulltexture every time I run the get_texture_name() function. Any ideas what I could be doing wrong here?

            Edit: changing "var split_1 = map_file.split("\r\n")" to "var split_1 = map_file.split("\n")" and applying your fix solved it!