How to avoid overlapping of GLB models in aframe?

I am creating a furniture configurator in aframe. There are multiple models which is added dynamically using js and all models are rotatable and draggable (using xrextras-hold-drag & xrextras-two-finger-rotate). Issue is Models are overlapping with each other on dragging from other models. Is there any way to prevent overlapping?

I have tried using physics system but there is an error in physics system script.

This is a great question! Using a physics library for this use case is over complicated and there’s a better way to approach it. Thankfully there’s a great answer on StackOverflow that sums up the way I would approach this.