Way to change mouse pointer when hovering gizmo custom mesh

Hi there:

I’m currently making a “significant” customization to the default BJS Gizmo functionality.

Among other things I’ve managed to implement, I need now to change the mouse cursor, but can’t figure out how to do it.

Please, have a look at this PG, what explains what I’m saying. Mouse event is detected, but the access to canvas seems to be wrong in this context of utilityLayerScene.

Thank you for your time and advice.

If you change

canvas.style.cursor = isHovered ? "pointer" : "auto";

to

document.body.style.cursor = isHovered ? "pointer" : "auto";

seems that it will work as expected.

1 Like

Thanks a lot, @labris. Certainly, I was overthinking the thing.

1 Like