Snapping cubes to other cubes with "attachment points"

Hi there.

I just started learning/trying to use Babylonjs for a project but I for the life of me can’t figure out how to do snap two generic Boxes together.

I’ve seen a ThreeJS example (GitHub - ISMAELHADDAD/threejs-drag-and-snap-tutorial) very similar to what I want to achieve on GitHub but I’ve gotten annoyed with ThreeJS rather quickly due to poor docs and constant changes in naming.

I understand that I probably have to calculate the closest vertice but I don’t get how I can really get it to stick to it. (And also only one side should really be snappable).

Does anyone have any idea or has achieved something similar?

Hello and welcome to the Babylon community! We had a topic a while ago about this, it might give you some good ideas :smiley: Collision and “attachment points” - Questions - Babylon.js (