Unusual way sockets can be used

Hi All,
I had a few ideas in the past when Sockets became the key to realize somenthing apparently difficult: binary tree fractals was one, procedural mesh plants stuck to the ground looking as static mesh was another. They both worked thanks to Sockets.
Sometimes I come to a point where Sockets are the unblocking key to move on and reach a goal.

Have you also used Sockets in a different unusual way than just attaching objects to a skeleton bone?


**1st example of Socket I used to unblock a problem: **
I had a tree as a proc mesh to be sliced (check my video when I cut a tree).
The base is stuck to the ground like a static mesh, while the rest of the tree behaviours like a procedural mesh physic object with gravity and Sym Physics.
Without the use of a Socket the tree was completely Simulating Physics and under gravity effect so once placed in the scene was never ‘planted into the ground’ like a static mesh but rolling down as a normal stone or sphere. So was a blocking point for me: I needed a procedural mesh in order to slice it…but I also needed a static mesh to stay planted into the ground.

I solved with 1 socket. This is what I’m reffering to when speaking about different ways to use sockets.
Socket was the key to solve this issue and make the base of the tree behaviour like a static mesh, while the rest like a procedural mesh with Physics and gravity enabled.

How I did it? :slight_smile:
Guess how…solution with socket and bprint code here tomorrow :slight_smile:

1eff73cec467232793b64a00a456c2ceed6cb637.jpeg](Katana Cut Trees & Giant Spheres - YouTube)

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.


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.

Wow, thank you for sharing!

Thanks, the more I use blueprint the more I discover sockets importance in solving many issues…really think a socket as 3d vector markers for delimit a specific volume area…there are infinte way of using them!

Woah this actually is one of the problems I’ve been having with trees as well as with physics objects in general. Thanks @ will look into using sockets more for gameplay now :smiley:

Unusual way of usage in skeletal mesh.
I inspired by you and finally I did it!
Though it still has little problems with physics simulation…

Nice! Did you use this ‘**Unusual way sockets can be used **’ system?

I think it’s not exactly same “system,” but the key is socket in my case, too.
Nobody uses sockets to build up whole skeletal mesh character usually :slight_smile:

Ah seems interesting. Will purchase your Slice version soon to see how you create it! :slight_smile:

Wow, thanks a lot :slight_smile: