Just noticed my Mobs weren’t using at all the VoxelTerrain for pathfinding in one of my maps, turned on “Show Navmesh” and Navlinks in Studio and… no Navmesh on terrain, only in very specific places at the edge of the map. modifying the Navmesh will sometimes work, but as soon as you refresh the Terrain (closing and opening it again, pressing Play, etc.) the Navmesh is again, gone.
The image bellow shows the only place where a Navmesh exists in the entire Terrain, which varies a lot in form, heights and shapes.
This was replicated on every attempt to import terrain by heightmap, using a variety of heightmaps, in multiple Places, even a clean one made just for this purpose.
so… what’s going on, exactly? my other (older) maps, also generated by Heightmap Imports and later manually finetuned all work as they should, but somehow now it doesn’t work? even manually created Terrain has no Navmesh at all when terrain is imported.
Am i missing something? making a mistake somewhere? all of this was working fine, one of my other maps was created not more than two months ago using this same method, but now it bugs out?
EDIT: This can be fixed by deleting/replacing the bottom layers of Lava/Bedrock that come with the terrain when you import something with a high foundation.
The Code bellow was made for a quick deletion of the entire Lava/Bedrock region without having the use the depressing “Region Selection” Tool.
Replace the values of P1 and P2 with your own, they act as the opposite corners of the Region 3, you can also change the Material with something else for a replacement instead of deletion.
local MaxRegionSize=500 local P1=Vector3.new(-3050,-50,3050) local P2=Vector3.new(8550,30,-3050) local _Material=Enum.Material.Air
local minP=Vector3.new(math.min(P1.X,P2.X),math.min(P1.Y,P2.Y),math.min(P1.Z,P2.Z))
local maxP=Vector3.new(math.max(P1.X,P2.X),math.max(P1.Y,P2.Y),math.max(P1.Z,P2.Z))
local cX,cY,cZ=((maxP.X-minP.X)/MaxRegionSize),((maxP.Y-minP.Y)/MaxRegionSize),((maxP.Z-minP.Z)/MaxRegionSize)
local eX,eY,eZ=(cX-math.floor(cX)),(cY-math.floor(cY)),(cZ-math.floor(cZ))
local fX,fY,fZ=math.floor(cX),math.floor(cY),math.floor(cZ)
local _mainC=0
for wX=1,fX+1 do local _LX=((wX-1)*MaxRegionSize) local _X=tonumber(MaxRegionSize) if wX==fX+1 then _X*=eX end
for wY=1,fY+1 do local _LY=((wY-1)*MaxRegionSize) local _Y=tonumber(MaxRegionSize) if wY==fY+1 then _Y*=eY end
for wZ=1,fZ+1 do local _LZ=((wZ-1)*MaxRegionSize) local _Z=tonumber(MaxRegionSize) if wZ==fZ+1 then _Z*=eZ end
local sP=minP+Vector3.new(_LX,_LY,_LZ) eP=sP+Vector3.new(_X,_Y,_Z) workspace.Terrain:FillRegion( Region3.new( sP,eP),4,_Material)
_mainC+=1 if _mainC==50 then wait() _mainC=0 end
end
end
end