CameraGizmo changes maxZ every time it shows

Engine: WebGL2
Version: 8.3.1
Playground: any

Steps to reproduce:

  1. Open empty playground: https://playground.babylonjs.com/
  2. Open Inspector
  3. Click camera
  4. Click “Turn on/off the camera’s gizmo”
  5. Watch value of “Far plane”

Expected: value of “Far plane” not changed

Actual:
image

Related code (Introduced ~5 years ago):

1 Like

cc @Cedric

1 Like
4 Likes

Thank you for the fix, but if 2 camera is created, and showing the CameraGizmo of one camera while the other camera is active, the active camera’s maxZ will be changed. Is this something expected? Why should there be this behavior?
screenrecording

Can you share a repro so that @Cedric will have a look when coming back from vacation.

Ok.
Steps to reproduce:

  1. Open the empty playground https://playground.babylonjs.com/
  2. Open Inspector
  3. Right click on “Nodes” - “Add new free camera”
  4. Click “camera1”, the value of “Far plane” should be 10000
  5. Click “Turn on/off the camera’s gizmo” of “free camera”, the newly created camera
  6. Watch value of “Far plane” changes (Current selected node is still “camera1”)

Expected: value of “Far plane” not changed
Actual: the image above CameraGizmo changes maxZ every time it shows - #5 by kzhsw

1 Like

I’ll take a look shortly!

2 Likes