Some c++ code doesn't work on a packed game !
I'm using a custom node made by Rama, this is the code :
It works great in the editor, and even on a standalone window, but when i pack it, it won't work anymore. I'v tried it as a plugin and also as a c++ class in the project, and it gave me the same results.
This is the blueprint: This is in the editor: And this is in a packed game:
asked Feb 17 '15 at 03:51 AM in C++ Programming
While searching for something similar I found a wiki page below that explains how to do this - https://wiki.unrealengine.com/Accessing_mesh_triangles_and_vertex_positions_in_build
It seems because of the way vertex data is packed in shipping builds you can't access the them through the vertex buffer on render data.
Note that I wasn't able to get the code in the wiki page to compile because of some Physx dependency issues but it's worth trying out for sure (I probably got my build.cs or includes wrong)
Solution Using PhysX
I've updated my BP node in my Victory BP Library plugin to use PhysX to get the vertex positions (special thanks to Vebski for pointing out that we can get accurate vert positions using PhysX in packaged games(
BP Node For You
UE4 Forum Link
C++ Code For You
Here's my C++ code that you can use to get the transformed (rotated, translated, scaled) vertex positions of any static mesh component!
You need to include APEX and PhysX in your build.cs dependencies
Follow this question
Once you sign in you will be able to subscribe for any updates here