Limit click events to one scene (when two scenes are in use)

I have made a Heads Up Display with a second scene, which sits fixed in the corner of the main scene and has some small UI. The issue is that clicks into scene_two are also registering in scene_main (behind it). Is there a way I can prevent the click events on scene_two from affecting scene_main?

I thought the autoClear setting would do that, but I’m wondering if this is some setting I’m missing in THREE or perhaps a CSS change… Thank you for any input.

Can you please show how you registered your event listeners?

1 Like

Thanks for your reply.

Second canvas setup:

secondCanvas.appendChild(secondRenderer.domElement) document.body.appendChild( secondCanvas );

No clicks/event listeners on second canvas other than:

secondCanvas.addEventListener("click", function(e) { e.stopPropagation() })

Um afraid it’s not possible to see from your shared code what’s going wrong. Consider to share a complete live example that demonstrates the issue. Sharing a github repository is also a good idea.