I’m trying to visualize the direction/range of lights in Babylon and so far I’ve been able to add a light gizmo and see the position/rotation gizmo but I can’t see the bounding box of the light. For a point light for example I’d like to see the spherical bounding box that represents the range of that light.
I modified this playground to show what I have so far, this is using a directional light but the concepts should be the same: https://playground.babylonjs.com/#Z4ZGAY#26
This is my method in my project:
CreateGizmos(customLight: Light) {
const lightGizmo: LightGizmo = new LightGizmo();
lightGizmo.scaleRatio = 2;
lightGizmo.light = customLight;
const gizmoManager: GizmoManager = new GizmoManager(this.scene);
gizmoManager.positionGizmoEnabled = true;
gizmoManager.rotationGizmoEnabled = true;
gizmoManager.usePointerToAttachGizmos = false;
gizmoManager.attachToMesh(lightGizmo.attachedMesh);
gizmoManager.boundingBoxGizmoEnabled = true;
//lightGizmo.attachedMesh!.showBoundingBox = true;
}
I thought the boundingBoxGizmoEnabled would have shown the bounding box for that light but it doesn’t seem to do anything. Do I need to adjust some other property in order to see it?