Hello,
I’m trying to detect clicks on a mesh. Documentation is pretty straightforward but I don’t think I’m importing the necessary modules for it to work correctly. Here’s my simple code:
scene.onPointerDown = function(e, result) {
console.log(result);
}
I get a PickingInfo in the console, but the _pickingUnavailable property is true. Searched that property in the babylonjs source and found this:
// Dummy info if picking as not been imported
const pi = new PickingInfo();
pi._pickingUnavailable = true;
So my best guess is I’m not importing something I should. What am I missing? Thanks.
EDIT: Looks like this does the trick. Although I wonder if I could import something more specific?
import "@babylonjs/core/Culling"