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:
If I break hit result and print the result like this:
The output log contains the X, Y values, return is true and the Actor is correct:
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):
Collision type is set to Simple And Complex, and Complex Collision is also enabled:
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.