Convex polygon shape resource for 2D physics.
2D convex polygon shape to be added as a direct child of a PhysicsBody2D or Area2D using a CollisionShape2D node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also CollisionPolygon2D.
The main difference between a ConvexPolygonShape2D and a ConcavePolygonShape2D is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
Performance: ConvexPolygonShape2D is faster to check collisions against compared to ConcavePolygonShape2D, but it is slower than primitive collision shapes such as CircleShape2D or RectangleShape2D. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape.
PackedVector2Array points =
The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use set_point_cloud to generate a convex hull shape from concave shape points.
void set_point_cloud ( PackedVector2Array point_cloud )