Drag 'n' drop collision

as when colliding objects when drag ‘n’ drop or gizmo forbid overlapping?

Hello and welcome,
can you be a bit more precise? Do you want to enable collisions when using Gizmos?

sorry google translate

yes collision with gizmo or collision with drag&drop

This is not supported yet BUT you can use gizmo observables to manually call the intersectmesh function

Gizmo doc: Use Gizmos (eg. Drag arrow, Bounding box) - Babylon.js Documentation

Using onDragObservable, you can then check collisions (Intersect Collisions - mesh - Babylon.js Documentation)

1 Like

https://www.babylonjs-playground.com/#UZ23UH#0
prohibit the imposition of objects

Something like that:
https://www.babylonjs-playground.com/#UZ23UH#169

1 Like

I want to do so

1 Like

you can do that with simple math, make boxes 1x1x1 and clamp position to rounded values.

( old version, but that’s what i did here; PlayBricks.Io )

2 Likes