Long atory short i am trying to use spine 2d on ue4 and s the plugin is very limited so i wrote my own.
The spine plugin builds a mesh ever fps uaing rmc.it works fine.
The thins is i need collisions. Using rmc with collisions is very expensive. Because the mesh is building every frame.
So ibwas looking how resolved it on unity. Spine can create a set of collision polygons so in unity they build a collision polygon with it and then make it folloe the bone.so the set of polygons is built once and the they just follow the bone position and rotation.
In ue4 i dont know how to build a collision polygon of n vertices. So right now my solution is create plane meshes polygons using rmc for each bounding box polygon for spine and make them follow the bone every tick with setvlocation rotation. At the beggining work sometimes but fps go down and rmc.dont collide each other all the time.
My solution now is on every tick on each actor i call get bounds for each mesh created and i use fbox for each one and check the fbox overlap result.
The problem is that it limits the colliaion are to boxes because get bounds and doesnt work for raycast checks.
So now i am looking at github ue4 to see how they made it with paper2d and polygons collisions. So far i have understand they use physx and box2d as optional.
So i would like to know(to resume sorry) how can i convert a polygon composed of a list of vertices without an index buffer and convert that into a collision polygon that can be moved ans rotated following a moving object using physx.