Github:
A barebone test from my application in github to isolate the problem but still no luck… ( using svelte with ES6)
In src/lib/Game.js(line 22) is the troublemaker
I was able to confirm that the reason why your mesh isn’t being picked is because the Ray class hasn’t been imported so picking becomes disabled. Since it looks like you’re just importing the files that you need, some of the files that are forward declared (like the Ray class) are not there. I could see a way of fixing this as just importing the main index and putting it under the BABYLON name space (import * as BABYLON from "@babylonjs/core";) or you could just import the Ray class manually (import { Ray } from "@babylonjs/core/Culling/ray";). There may be a cleaner way to handle this (@RaananW or @sebavan might have a better idea) but having access to that class should fix it.