I encountered an issue with the Position Gizmo in the Sandbox. When a mesh has negative scaling applied, the Y-axis of the translation gizmo flips and points downwards. Interestingly, this issue only occurs when the Coordinates Mode is set to “World”; if it is set to “Local”, the gizmo behaves correctly.
Steps to reproduce in Sandbox:
- Open https://sandbox.babylonjs.com/ and drag-and-drop a custom 3D model into the scene.
- Open the Inspector and select the mesh.
- Enable the Position Gizmo (Translation).
- Set the Coordinates Mode to World (the globe icon).
- Change the mesh’s Scaling to negative values. The Y-axis flips downwards in several scenarios, for example:
- Only X is negative (e.g., X=-1, Y=1, Z=1)
- Only Y is negative (e.g., X=1, Y=-1, Z=1)
- Only Z is negative (e.g., X=1, Y=1, Z=-1)
- All axes are negative (e.g., X=-1, Y=-1, Z=-1)
Actual behavior:
In World mode, the Y-axis arrow of the gizmo flips from pointing upwards to pointing downwards under the negative scaling conditions mentioned above. (Note: In Local mode, it works perfectly fine).
Expected behavior:
Since the Gizmo is in World mode, its axes should always remain fixed and strictly aligned with the global World axes (Y always pointing up), completely ignoring the mesh’s local scaling or rotation.
Thank you for looking into this!