godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.2k stars 21.21k forks source link

Gizmo x-ray mode only works for last selected node #49079

Open foxydevloper opened 3 years ago

foxydevloper commented 3 years ago

Godot version: Tested in v4.0.dev.custom_build.b6f381475 v.3.2.3.stable

OS/device including version: Windows 10, tried on both GLES3 and Vulkan

Issue description: Turning on x-ray mode for gizmos only works for the last selected node. It's tooltip says "Half-open eye: Gizmo is also visible through opaque surfaces ("x-ray").", so it doesn't sound like it's the intended behavior. If it is the intended behavior, it should probably be documented better.

Steps to reproduce: Turn on x-ray mode for a gizmo, in the View->Gizmos menu. x-ray mode will only work properly (showing above other objects) for the node selected last.

https://user-images.githubusercontent.com/12120644/119562374-41a32900-bd74-11eb-84f8-f39b7dc3fa8a.mp4

Minimal reproduction project: TestingGizmoXRayMode.zip

Calinou commented 3 years ago

I think this is intentional behavior, it's just poorly documented.

However, I think the behavior is not very useful the way it's implemented, so I suggest we change it to the following: