So, I’ve been using Hierarchical Instanced Static Meshes to build landscape for a procedural world, and it appears that NavMesh doesn’t work with it.
I switched all the instances of my Hierarchical Instanced Static Meshes to regular Instanced Static Meshes, and the NavMesh volume worked immediately.
Is this a known/intentional limitation? Am I misusing the Hierarchical Instanced Static Mesh by making ground/floor tiles from it?
Thanks in advance!
For reference, I called the Hierarchical Instanced Meshes this way:
h:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Path")
class USceneComponent* rootSC;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Path")
class UHierarchicalInstancedStaticMeshComponent* groundHIMesh;
cpp:
rootSC = ObjectInitializer.CreateDefaultSubobject <USceneComponent>(this, TEXT("RootSceneComponent"));
//Set the root component
RootComponent = rootSC;
groundHIMesh = ObjectInitializer.CreateDefaultSubobject < UHierarchicalInstancedStaticMeshComponent >(this, TEXT("groundHInstancedStaticMesh"));
groundHIMesh->AttachTo(RootComponent);
//more code
FVector currentLocation(UMyStaticLibrary::convertIntToVector(i, FVector(map.width, map.height, 0)));
//Add Core Instance
FTransform newTrans= FTransform(FRotator(0, 0, 0), currentLocation, FVector(1, 1, 1));
newTrans.SetLocation(currentLocation * tileSize);
if (map.MapDataArray[i].isGround)
{
this->groundHIMesh->SetStaticMesh(_groundMesh);
this->groundHIMesh->AddInstance(newTrans);
}
And to create the non-Hierarchical version, I replaced UHierarchicalInstancedStaticMeshComponent with UInstancedStaticMeshComponent.