I want to add local position offset to a mesh. If it’s a static mesh, I can transform the offset vector to world space(or component space). However, if it’s a skeletal mesh, I can’t transform the offset vector to bone space. If I transform it to world space, when the bone is moving, the vertex position is wrong.
Hey there! By default in 5.6 skeletal mesh vertex normals are recalculated every frame (this used to be an explicit option to opt-in to in UE4, but no longer). If the WPO you want to apply is along the vertex normal, that should suffice.
There aren’t any systems to pass bone transforms to each vertex, unfortunately, so there’s not going to be an easy solution for more complex WPO.
You do have access to the pre-skinned local position of a vertex, so you could use the local position of the vertex (IE after skinning) to get a vector from Pre to Post, and use that vector along with the current vertex normal to create your own “Matrix” to transform your WPO using the Transform3x3Matrix material function.
Thoughts?