Skip to content

Conversation

@vivienneanthony
Copy link

This should fix the source to work with the latest version of runtimemeshcomponent, Linux, and Unreal 4.25

Note
I used ProviderStatic as the example https://github.com/TriAxis-Games/RuntimeMeshComponent-Examples/blob/master/Source/RuntimeMeshSandbox/BasicExamples/BasicPMCStyleRMC.cpp. It should be a regular provider which enables the multithreading. I will be looking into that then implementing it.

m_TerrainMeshComponent->SetCollisionProfileName(UCollisionProfile::BlockAll_ProfileName);
m_TerrainMeshComponent->Mobility = EComponentMobility::Static;
m_TerrainMeshComponent->SetMeshSectionCollisionEnabled(0, true);
//m_TerrainMeshComponent->SetMeshSectionCollisionEnabled(0, true);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you test collision on the mesh? can you trace to it and/or can UCharacter walk on it?


}
void ATerrainActor::OnConstruction(const FTransform& Transform)
void ATerrainActor::OnConstruction(const FTransform &Transform)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

/// Modified from original
URuntimeMeshProviderStatic *provider = (URuntimeMeshProviderStatic *)m_TerrainMeshComponent->GetProvider();

if (provider)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(!provider)
  return;

this way we don't get into deep if nesting

// Modified from original
URuntimeMeshProviderStatic *provider = (URuntimeMeshProviderStatic *)m_TerrainMeshComponent->GetProvider();

if (provider)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same re: "if nesting" -- if(!condition) return;

@vivienneanthony
Copy link
Author

I just noticed the additional comments. I'm going check it out later also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants