Is there an easy way to convert a world-space trace on an object into UV space?

NB: A blueprint-centric solution would be best, since I’m not yet working in C++… thanks!

I’m playing around with something at the moment, and what I want to do is this:

  1. I perform a trace from the players POV to the center of the screen.
  2. Where this trace intersects a certain object, I want to get the UV coordinates of the trace, relative to the texture it intersects with.

Alternatively, getting mouse coordinates relative to that surface, based on the trace intersection would also be very helpful. Think computer screen, with a cursor rendered where the trace intersects the object (at the center of the players POV)

Is this possible?

There was a hit mask component in UE3, But I haven’t found in in UE4 yet ( UDK | HitMask )

I would very much like an easy method to convert from world coordinates to uv coordinates as well.

I’m interested in this as well.

This function would be very handy right now. Any workarounds to achieve the same result?

Use FindCollisionUV node.

You can use a Line Trace hit result to find the UV that was hit. But make sure to do the following:

  1. Under Project Settings > Engine > Physics > Optimization, enable “Support UV From Hit Results”. This enables the feature but uses more CPU to store the UV information.
  2. When performing the Line Trace, ensure, “Trace Complex” is checked.