Struct CollisionPolygon2D

Defines a 2D collision polygon.

struct CollisionPolygon2D ;

Provides a 2D collision polygon to a CollisionObject2D parent. Polygons can be drawn in the editor or specified by a list of vertices.

Properties

NameTypeDescription
buildMode[get, set] CollisionPolygon2D.BuildModeCollision build mode. Use one of the buildmode constants.
disabled[get, set] boolIf true, no collisions will be detected.
oneWayCollision[get, set] boolIf true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
oneWayCollisionMargin[get, set] double
polygon[get, set] PoolArray!(godot.core.vector2.Vector2)The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.

Methods

NameDescription
getBuildMode
getOneWayCollisionMargin
getPolygon
isDisabled
isOneWayCollisionEnabled
setBuildMode
setDisabled
setOneWayCollision
setOneWayCollisionMargin
setPolygon

Enums

NameDescription
BuildMode
Constants