+1 vote

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. :/

in Engine by (72 points)

1 Answer

+1 vote

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:

https://github.com/godotengine/godot/issues/31283

by (10,914 points)

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)

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!

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.