Runtime Mesh Component

Hey ,

i had a quick look into the RuntimeMeshComponent.cpp and found this section



#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 13

// See if we should copy UVs

bool bCopyUVs = UPhysicsSettings::Get()->bSupportUVFromHitResults;
if (bCopyUVs)
{
CollisionData->UVs.AddZeroed(1); // only one UV channel
}
#endif

so my guess is that it the collision should have the neccessary UV information for a UV trace. I’m on 4.18 on MacOS, support uv from hit in project settings is enabled and working on simple static meshes.

Whatever i do though, i can’t get it to show anything else than 0,0. I tried using non overlapping UVs in 0-1 space, swapping through all sorts of collision settings on the “Add RMC” blueprint node. Do you have any idea what i could be doing wrong? Do you know if Normals/Tangents have to be setup up correctly for the UV Trace to work?

What i am doing is creating multiple RMCs with a single mesh section each within a simple blueprint Actor.

EDIT: Quick follow-up:
I made a very simple setup of just a box in an empty BP Actor and Create Box Mesh

The Procedural Mesh component works flawlessly whereas the Runtime Mesh component doesn’t return the UVs on LineTrace. Any clue what could be causing this?

EDIT 2: The Simple Box Setup from the first edit was created inside the Construction Script.
Doing the Geometry Creation on BeginPlay in the EvenGraph stops both, RMC and PMC from returning UVs.