I thought I’d discuss my change before submitting a pull request as there are probably better ways of achieving what I’m doing.
As the title says, I’ve implemented socket to vertex snapping and given the ability to add meta data to a socket.
My motivation for doing this is to setup static meshes with sockets in perfect position for procedurally connecting multiple meshes. Using the pivot point alone isn’t enough. This unfortunately requires the mesh to be authored with vertices in strategically placed positions - hence this post in case anyone has better ideas. Not the end of the world but worth brainstorming other approaches.
The meta data can be used to give the procedural level generator hints on which meshes are appropriate to select. I’ll also be peppering static meshes with sockets for object placement, again giving hints as what to spawn. Am I abusing sockets? Sure as hell beats using bones!
These are my use cases but these features could be used in other ways. Does anyone think this will be useful?
Gif of it in action:
Meta data: