Godot: "Visible Collision Shapes" - custom colors for different nodes?

Created on 11 Aug 2019  路  5Comments  路  Source: godotengine/godot

Right now it is all light blue. But I think it'd be handy to be able to set a different color for, let's say, a different tile map. So I could detect misbehaving collisions in a more efficient way.

archived discussion feature proposal editor

Most helpful comment

Would be nice with a "debug color". This would make it possible to prototype a game even without adding any sprites. Which would be an extremely useful feature for 2D.
Setting the modulate works, but it cannot remove the blue tint. Also it cannot set fully opaque colors to shapes either.

All 5 comments

I can see two ways to achieve this:

  • Add a "Debug Color" property to CollisionShape. This requires some manual setup, but it also allows for hiding specific collision shapes by setting the color to Color(0, 0, 0, 0).
  • Pick a color automatically for each CollisionShape instance (shared with other identical shapes). I wonder how this could be made "deterministic" across project restarts though.

It already does this. Set the modulate property of the node.

@Calinou I think both options should be available as they would be useful in different scenarios/types of scenes. Maybe there should be small options menu for choosing strategy of displaying collision shapes: all blue, random, taken from node property of collision shape.

Would be nice with a "debug color". This would make it possible to prototype a game even without adding any sprites. Which would be an extremely useful feature for 2D.
Setting the modulate works, but it cannot remove the blue tint. Also it cannot set fully opaque colors to shapes either.

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

(btw, you can remove the blue tint with debug/shapes/collision/shape_color in Project Settings)

Was this page helpful?
0 / 5 - 0 ratings