Buttons in CSS2DObject not working

I’m trying to create annotations like sketchfab. I’ve used orbit controller and CSS2DObject for creating annotation buttons.

for CSS2DRenderer
markerRender.domElement.style.pointerEvents = 'none'

If I use pointer event as auto, I can interact with buttons but cannot interact with my model.
If I use pointer event as none, I can interact with model but cannot interact with buttons.

You can toggle between those.
for example, when pointer enters onto the button, you can disable rotate of orbitControls and when you leave from button, you can enable orbitcontrols and can remove listener from button or use flag for it inside listener.

It’s not working

Could you share your code so that I can see details?

The above is needed for you to interact with the 3D scene behind the css2D overlay so keep this as it is, now you should just have to set pointer-events: all (css) on the base button css class so all the buttons receive pointer events or in js…

button.style.pointerEvents = 'all' 
1 Like

Thanks @Lawrence3DPK . It’s Working.