I think I’ve done everything as described in the release notes - “Support UV From Hit Results” is set in Project Settings. I use LineTraceByChannel to get Hit Result Structure. The hit is registered, but UV vector is not. Am I doing something wrong?
No idea, i’ve done the same, and it only returns (0,0) no matter what I’ve checked the actor im hitting has UV’s in the channel 0 i set it to. Still nothing. Anyone have ideas to what we’re missing?
One thing though, is that i’ve noticed that the Return Value from “Find collision UV” returns false. So apparently it can’t find the UV hit, but why not? The box im hitting is just one of the standard Static Mesh boxes in the 1st Person Example project.
based on testing so far, two thing need to be considered.
use lineTraceingbyObjects with custom collistion filter
create line tracing and find collistion UV from line tracing source not from target
( my case, add on event graph on characterBP, not the collision meshBP )
By this condition met, the find UV works as advertised. I am not sure it is bug or designed to be working this way.
I just finished struggling with this and since this is the first result in google for “ue4 find collision uv” I’ll add my 2 cents.
My problem was that I had set the mesh to “use simple collision as complex” setting it back to the default of “simple and complex” fixed my issue.
So here’s my theory on how this works: the node uses the UV mapping of the mesh to determine where the UV collision happened, but to do this the input hit from a line trace must hit the actual mesh and not a simplified hitbox, since my hitbox had no UV mapping it simply gave 0,0.
It might be possible to copy the UV mapping of the mesh onto the hitbox so that any hit on the hitbox does give a somewhat accurate response, but that would require fiddling with blender for me and I only need the UV collision very rarely.
Take with a big grain of salt since I’ve not seen the actual code for the node.
For those who stuck with this on C++ side, make sure FCollisionQueryParams for line trace params has those 2:
QueryPrams.bTraceComplex = true;
QueryPrams.bReturnFaceIndex = true;
How can “Find Collision UV” be used with the Hit result from an Event Hit? It returns 0,0 every time. why does this function require complex tracing (whatever that is) and how can that be turned on for hit events?
The project I worked on on my laptop showed the same problem on my computer. Fortunately, I set TraceComplex to true and solved it, but I don’t know why. Is it because the UV of the flat static mesh is different? No, UV moved from simple to complex, but the results didn’t change.
Do you have any idea?
Super specific solution but in case you’ve fiddled around with the project settings like I once did, make sure this setting stays unchecked, otherwise you get 0.0, 0.0.