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
Name | Type | Description |
---|---|---|
buildMode [get, set]
|
CollisionPolygon2D | Collision build mode. Use one of the buildmode constants.
|
disabled [get, set]
|
bool | If true , no collisions will be detected.
|
oneWayCollision [get, set]
|
bool | If 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
Name | Description |
---|---|
getBuildMode
|
|
getOneWayCollisionMargin
|
|
getPolygon
|
|
isDisabled
|
|
isOneWayCollisionEnabled
|
|
setBuildMode
|
|
setDisabled
|
|
setOneWayCollision
|
|
setOneWayCollisionMargin
|
|
setPolygon
|
Enums
Name | Description |
---|---|
BuildMode
|
|
Constants
|