I am trying to improve the performance (FPS) of thin instances with mouse hover interaction. Here is a “hover bomb” I’ve created using two pre-existing playgrounds: https://playground.babylonjs.com/#V1JE4Z#75
I’m probably just not taking advantage of something in the API. Any pointers would be appreciated!
You can use scene.onPointerMove for example so the picking is only computed when the mouse move, better than before each render ! See : https://playground.babylonjs.com/#V1JE4Z#77
I’d just done something similar with scene.onPointerObservableAdd (using BABYLON.PointerEventTypes.POINTERMOVE).
Although using either that or scene.onPointerMove increases FPS while the mouse is not moving, the FPS still drops significantly (60 → 14) when the mouse is moving about.
This seems to improve things. I’ve throttled to 100ms (60 FPS is ~ 17ms). Not sure if that’ll feel responsive enough if, say, I attempt to change the color of the hovered instance.