How to stop objects to collide

I am trying to make a room decorator and want to make the objects to not phase through each other, what’s the best way to achieve this I was trying to achieve this by checking if the box of the objects intersects with each other or not. If they are colliding return to the previous position but that didn’t seem to work for me. Also I want the objects to work with dragcontrols.

Any help would be appreciated and thanks in advance for your time.

If needed I will show some pictures to demonstrate my needs better.

Did you see this:

and this:

Btw, if you share the code I think the community can help you a lot better!

1 Like

I did try this but my issue is that I am working in R3F, I also tried using the physics engine to make the work easier for me, but little did I know that dragControls doesn’t update the position of the rigid body. I’ll share the code and will let you know.

1 Like