Breaking changes in @4.0.0-alpha.24?

I noticed that when I upgrade my application from 4.0.0-alpha.22 to 4.0.0-alpha.24 scene.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.)

Thanks! :slight_smile:


are you using ES6 modules? any error on the console?

What do you mean by

Yes I am, no errors on the console.

  1. 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.
  2. 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)

Thanks again @Deltakosh!

  1. Did you make sure to add an import for Ray (which is required to get the pick side effect). Pinging @sebavan FYI

  2. Yes so I think importing ‘@babylonjs/core/Culling/ray’ will do the job :slight_smile:

A good read on why we are not always signaling the missing imports (backward compat first):

You’re right, I’ve added the ray dependency and it’s working now.
Those side effects are bearable for sake of tree shaking :slight_smile: 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.

Good night @Deltakosh and thanks again.

We would love so much to find an easy disoverable way for the side effect !!!

I am taking literally any ideas that does not break back compat :slight_smile:


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.