Hello,
I noticed that when I upgrade my application from 4.0.0-alpha.22 to 4.0.0-alpha.24scene.pick(...) stop working altogether, are there any breaking changes in alpha.24?
Any idea how can I track the exact changes made from alpha.22 to alpha.24?
(tried to upgrade to the latest version from alpha.18 but encountered this bug, so I tried to trace down the exact version in which the pick stopped working.)
By “stop working” I mean:
I tried a pick the “have to work”, pointed the camera towards the floor (which is huge in my case and cover the entire canvas), made sure the activeCamera is the right one and then tried to pick any mesh (scene.pick(x,y, () => true) tried a few (x,y) and none worked.
I’ve made some progress investigating the issue - when I add import '@babylonjs/core/Cameras/VR', everything works.
my activeCamera is arcRoate and I have another dormant free camera, I don’t use VR device (or have any VR related features that I know of)
I try to keep my dependencies as specific as possible, so I only require ‘@babylonjs/core/Cameras/arcRotateCamera’ and `’@babylonjs/core/Cameras/freeCamera’ directly.
btw, found somehow the same bug with '@babylonjs/core/Animations/animatable' which is also required when loading a .babylon file with SceneLoader.ImportMeshAsync or else an exception will be thrown. (even when there are no animations in the imported mesh or in the scene)
btw 2, not sure if it’s any help but went through the commits between 22 and 24 and found I suspect it might be related.
(if you feel like this should be reported as a bug on github let me know and I’ll open an issue)
You’re right, I’ve added the ray dependency and it’s working now.
Those side effects are bearable for sake of tree shaking but are really hard to trace, so I believe that it will be a major improvement to solve those issues, just my two cents though.
I think that when breaking changes are not too frequent, well documented and for good reason it’s something every programmer should expect.
But you’re truly doing wonderful work so I guess you have your reasons.