Download

How do I snap an actor's component to a different actor's component?

Hi,

I’ve been trying to snap 2 cubes together during runtime by using box components, so in theory they align with other cubes with the same box components nicely. I was wondering how this can be done whilst still keeping the static mesh’s relative location to the box components?

560346ae76aff10c952b824c29e46caa8dc4d11b.jpeg

I have tried a number of methods but I can’t seem to get it right.
Any suggestions on how to achieve this are much appreciated.

Jon

why not put sockets on the corners of your cube static mesh and use those to snap the cubes together with an attach to node? You can find the socket manager in the static mesh editor. I’ve had this work really well for snapping static meshes together, although mine were cylinders.

Capture.JPG&stc=1

So socket attach to socket? Hmm Rama suggested something similar to me before. Ok I’ll give it a go.

Thanks!
Jon