UtilityLayerRenderer or UtilityLayerRenderer.utilityLayerScene click

I have a PG
I want to pointer scene to give feedback

line 361

//click no feedback
    axisScene.onPointerDown = (evt, pi)=>{
        console.log("click utilLayerScene pointer", evt);
    utilLayer.onPointerOutObservable.add((pointerInfo) => {
        console.log("click utilLayer faces", pointerInfo);

The utility layer scene has special logic for handling pointer events, that logic notifies the onPointerObservable but not onPointerDown: layer obversable | Babylon.js Playground (babylonjs.com)


base scene , I add GizmoManager to control sphere
but positionGizmo is not working
code line 314 is not working

maybe because of the axisScene camera viewport ?

also based on my experience, make sure to always pass a utility layer for the gizmo, cause despite what scene you create the gizmo on, the gizmo utility layer will be created based on the last created scene, maybe that’s was one of your issues.

here I tweaked your code a bit, for the axisScene, instead of creating a utility layer and get its scene, I created a new scene directly, this will separate the concern between your originalScene, the gizmo utilityLayerScene and the axisScene.

hope it helps

Based on your suggestion, I moved the line 314-323 code to line 341
old link :

new link:

I need only a Scene[main Scene] (show sphere)
DirectBoxCreator use utility layer to create is not main Scene

I did it!