Hi! I think that there is some bug in the mesh intersection detection if you change mesh pivotmaterix position. It works fine with Babylon 4.2.1 but with 5.0.0-beta.5 there are some problems.
Here is a test scene that demonstrating the problem when dragging red box near walls. Gray helperbox should follow this red box if it doesn’t intersects with walls:
You are absolutely right - my bad!!! I copy/paste the wrong playground link first, but now it’s updated. And i put it here also: https://playground.babylonjs.com/#LTWRV7
Oh I think it might be cause at the time of the drag event the pivot has been unset. Adding @Cedric to double check cause if I remember well there were some tricks lately to allow correct drag behavior and pivots ?
After moving the check to onBeforeRenderObservable and calling computeWorldMatrix before intersectsMesh, then it seems to be detecting the intersection correctly, in case that helps narrow the issue down more…
Yes you remember right, i had problems with PointerDragBehaviour/dragPlane when using Babylon 5.0.0-beta.4 but @Cedric fixed it and now it works correctly with 5.0.0-beta.5.
Hi! I would have asked if a final solution to this problem has yet been found? In the latest version v5.0.0-rc.0, the problem seems to still exist. @Blake 's example works as a workaround but I think that it doesn’t solve the exact bug?
Hi! Did i understand correctly that this bug has been fixed in this latest version 5.0.0-rc.3? For some reason my playground scene still working ”wrong way” as before with all versions 5.x but correctly with version 4.2.1.
I tested this PG example yesterday and it didn’t work yet and still PG showed version 5.0.0-rc.3.
Btw how those versions go in BabylonJS - are there some intermediate versions when the actual version number isn’t changed at all? Sorry I’m a rookie with your framework and still learning how things work