Welcome to the Godot Reference Fork and the Godot Proposals Fork alternatives. Why?

ConvexPolygonShape2D

0 0 vote
Article Rating

Inherits: Shape2D < Resource < Reference < Object

Convex polygon shape for 2D physics.

Description

Convex polygon shape for 2D physics. 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).

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 in order to speed up collision detection.

Properties

PoolVector2ArraypointsPoolVector2Array(  )

Methods

voidset_point_cloud ( PoolVector2Array point_cloud )

Property Descriptions

DefaultPoolVector2Array(  )
Setterset_points(value)
Getterget_points()

The polygon’s list of vertices. Can be in either clockwise or counterclockwise order.

Method Descriptions

Based on the set of points provided, this creates and assigns the points property using the convex hull algorithm. Removing all unneeded points. See Geometry.convex_hull_2d for details.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x