Click markers and text

Hello, all. As of this example

I want to place markers in my 3d scene and open texts labels windows on pressing them?

How can i do this?

1 Like

I managed to have a text with a CSS2DRenderer but now my orbit camera is stuck, cant move???

@Mugen87 hello, sorry to bother. Why i have to stop pointer events

style.pointerEvents = ‘none’; (orbit camera is frozen if i dont set none)

and at the same time i need pointer enevent on a CSS2dlabel

hotspot.addEventListener( ‘pointerenter’, event => console.log( event ) );

if i want to make it hover

I dont find how to have camera.orbitcontrols , working , and at the same time labelRenderer.domElement.style.pointerEvents set to work too .

I’ve built an event fonction

function onMouseMove( event ) { 
   var intersects = raycaster.intersectObject(scene, true);
   if (intersects.length > 0) {
       const object = intersects[0].object;
	   console.log(object.name);}

}

on mouse move is similar to mouse hover , there the function make a display of object hovered in console .