How to draw CollisionPolygon2D?

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

Hi everyone,

now this might be a stupid question, but I simply cannot find out how to draw a CollisionPolygon2D in the editor. In earlier versions of Godot, there seems to have been a tool for that but those buttons seem to have disappeared in 3.0? Anyway, how do I do this now?

Thanks in advance.

:bust_in_silhouette: Reply From: Zylann

They still exist, look closer:

CollisionPolygon2D has them, not CollisionShape2D with a Concave/Convex shape.

My bad, what I was doing was, I had a CollisionShape2D and then selected a ConvexPolygonShape2D as Shape. How do you edit that then? I saw you can type in vertex coordinates manually, is that the only way? Also, what’s the difference between this and using a CollisionPolygon2D?

Vinterskog | 2018-01-31 22:35

I don’t think you can edit those in the editor, not even in Godot 2.1.4.
CollisionPolygon2D allows you to do this, and I believe it is using either Concave or Convex shapes under the hood.

Zylann | 2018-01-31 22:38

Thanks for the answer! :slight_smile:

Vinterskog | 2018-01-31 23:03