scene.getPointerOverMesh() is always null

Why is scene.getPointerOverMesh() always null? Is this a bug? How do I get a hovering mesh on every frame? Can only be done by ray cast?

https://playground.babylonjs.com/#SYC786

You have to set enablePointerMoveEvents = true for the meshes you want to be pickable through this method:

https://playground.babylonjs.com/#SYC786#3

1 Like