So I’m hoping that someone here would be willing to help me with a problem that I’ve been running into with relative offsets in relation to vectors/transforms.
My current goal is to put together a system that can “build” a space station using modular geometry while leveraging mesh sockets to act as anchor points between meshes.
The meshes are being instanced so traditional socket “attachment” doesn’t work and I have to rely on relative offsets based on the parent component transform and instance location.
Unfortunately, this sort of math is a little out of my wheelhouse and is currently holding up my progress. So far, I’ve been able to get all of the socket data handling/parsing and mesh instancing to work with little to no issue (I’ve dealt with that before) but getting the mesh instances to align correctly to the parent is proving more challenging.
If anyone has any experience with systems like this any assistance would be greatly appreciated.
If you would rather talk than use text, I’m apart of the Unreal Slackers Discord and can hop into a voice channel there. (Steven#0116)
Summary of what I’ve tried so far:
Ok, so here’s the function I tried to put together (this is based on something I found on BlueprintUE) ultimately goal is for it to return the location and rotation of a given socket on a mesh instance (both parent and child) so that I can align the child mesh to the parent.
I had also thrown a few other tests together all of which yielded different results, none of which were what I wanted.
Here is a quick example of what the general idea would look like if it were simplified down to effectively a TL,DR Blueprint (if such a thing even exists) the actual blueprint for the whole system is pretty fat and would be a nightmare to screenshot.
Long story short you place a “Core” mesh with various sockets on it, this represents the central structure. The “core” mesh will then have child meshes (which also have their own sockets) placed and aligned to “parent” sockets.
As an aside;
I had also tried this simple little setup to grab only the location of a socket on a given instance and while it worked when simulating the graph in the Actor viewport, I received different results in the main Level viewport.
I’m not sure what’s up with that and I can only assume that the Actor viewport handles coordinates differently than the main level.