godotengine / godot

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

Changes to CollisionShape2D debug color project setting are not applied due to the previous default color being considered as custom #90965

Open Calinou opened 5 months ago

Calinou commented 5 months ago

Tested versions

System information

Godot v4.3.dev (4a0160241) - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 550.67) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Changes to CollisionShape2D debug color project setting are not applied due to the previous default color being considered as custom:

image

https://github.com/godotengine/godot/assets/180032/8208ad7a-e514-4271-9f89-69f448f64b34

To resolve this, I suggest using the RayCast3D custom debug color behavior instead:

image

An opaque black color is considered as being "no override". In practice, you'll almost never want a debug shape to be opaque black – and if you really want to, you can use #010101 or #000001 anyway.

Steps to reproduce

Minimal reproduction project (MRP)

N/A

dalexeev commented 5 months ago

I think in practice you rarely change the project setting.

To resolve this, I suggest using the RayCast3D custom debug color behavior instead

This option is inconvenient because you need to manually change the alpha channel. For a ray cast it's not necessarily as it is a line, but the collision shape is a figure. Alternatively, we could use PROPERTY_HINT_COLOR_NO_ALPHA, but this would make the alpha channel unconfigurable.