Unusual way sockets can be used

Here the trick I used:

  • when I convert static mesh to procedural mesh I initially don’t create a collision on the proc mesh.
  • I save all the vertex of the static mesh tree in an array: for each of them I compare the coords with the socket coord that is positioned at the base of the tree. Of course I have to compare the socket collision inside the world scene, that’s why I add procedural mesh world location to the socket location.
  • I add collision to the vertex of the procedural mesh following this simple rule: if a vertex Z axis location is above ‘>’ the socket Z axis location => it will have a collision and will be possible to cut it. If is below the socket has no collision and it will behaviour like a static mesh, not like a procedural mesh.
    That’s it!
    Following this rule you can set as many sockets you want on a mesh and adding a radius to their vector location you can define socket spheres as volumes where the procedural mesh will not receive collision!!!
    Reversing the rule, you can delimit a specific area of the procedural mesh that will receive collision and all the rest have no collision. You can define many areas with collision or not.
    Here below the code in the brpint that converts a static mesh in a procedural mesh.

0e7aa12e99d0269a2b3ded1d1eecf69497ada5d9.jpeg

Hope this was useful and hope you will also add some unusual way you applied Sockets in your projects! This is why I created this post.
Thanks for sharing or commenting the above example.