Find Collision UV returns false for Dynamic Mesh Component

Hi,

In Unreal Engine 5.4.0 and Geometry Script 0.1, I’m trying to achieve the following:

I have a dynamic mesh generated at runtime. I want to sample a specific color at mouse position at left click from it’s albedo texture.

I do the line trace with Line Trace By Channel (not with Get Hit Result Under Cursor by Channel, because I can’t draw the trace line and hit easily with that).

From the camera’s perspective, the trace hits the dynamic mesh:

image

If I break hit result and print the result like this:
image
The output log contains the X, Y values, return is true and the Actor is correct:
image

If I hook the hit result to Find Collision UV, it returns false and 0,0 as UV X and Y:

Suppoert UV From Hit Results is enabled in Project Settings:

Hit events and Overlap events are generated for the GeneratedDynamicMeshActor (it might be completely unrelated to this):

image

Collision type is set to Simple And Complex, and Complex Collision is also enabled:

image

Edit: I’ve tried with DynamicMeshActor instead of GeneratedDynamicMeshActor, result is the same.
Edit2: After some debugging, I figured out VertUVs in UVInfo is null, so that might be the cause CalcUVAtLocation returns nothing in FindCollisionUV.

Hi! Were you able to sort this out? I am stuck on the same issue. I have a dynamic mesh that is displaced using a texture map. The UVs are valid since I have a texture map on the mesh that looks correct. When I trace against the mesh things are fine, however, when I look up the UVs, the return is false. I have complex mesh enabled and collision type set to “Use complex collision as simple”.

Based on your investigation, it looks like vertex UVs are absent. Can those be recomputed in some way using a BP node similar to how the normals are recalculated after displacement?