Get vertex normals from a triangle, hit by a raycast?

Does anyone know how to, in blueprints ideally, get vertex normals from a face ID?

I’m shooting out a ray onto polygons, and want to get the vertex normals of polygon hit so that I can calculate barycentric coordinates from those.

I can’t seem to figure out how to get anything useful from Face ID from the result of the raycast, but was hoping there would be a simple FaceID → GetVertexArray → GetVertNormal type methods to play with here.

I would be surprised if this wasn’t exposed to blueprints… but maybe that is the case?

Thanks for any help!

I thought the normal pin from the standard line trace, was the vertex normal?

Thanks for the replay.

That would be the face normal of the polygon that was hit I’m pretty sure. I’d want the normals from 3 vertices that make up that polygon/face.

Correct, that’s what I thought you meant :slight_smile:

For the verts, no idea, I’m afraid…

Ok, thanks for trying though… let’s see if anyone else have any ideas cause I’m all out of them.

I know how to get ALL the vertices for a given static mesh.

Unfortunately I don’t know how you would get the exact verts for any given face. Sorry

Maybe this could help though?

In the static mesh enable “Allow CPU Access”
In BP use “get section from static mesh”

By distance from hit location, maybe?

That means looping though until found.