Can you change the color of the shapes displayed in the editor and running with debug?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By brazmogu

Is there some attribute that can be set to change the appearance of shapes (especially collision shapes) when they appear in the editor or when running with the “Show Collision Shapes” option turned on? I have a number of shapes in my objects that I’d like to be able to view and easily identify them as I’m working, but since they all appear in the same transparent blue, that makes it hard to do.

The best solution I can think of is using the _draw function, but I really would rather not have to define my own sub-class just so I can improve my game’s visualization. :confused:

:bust_in_silhouette: Reply From: jgodfrey

You can change the single color used for collision shapes via:

Project Settings | Debug | Shapes | Collision | Shape Color

There is at least one proposal for making this more flexible here:

Additionally, you can change the color of an individual collision shape by changing its modulate color and/or transparency in the inspector (or from code)

jgodfrey | 2020-11-04 23:59

I did try to use modulate for that, but that turned out very bad because the modulation is applied over the original color.

I just realized, though, that defining shape colors to be white instead of sky blue will allow me to modulate them successfully!

brazmogu | 2020-11-05 16:22

Correct (set to white) - sorry I neglected to mention that above.

jgodfrey | 2020-11-05 16:31