CollisionPolygon

Editor-only class for defining a collision polygon in 3D space.

Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a Shape for gameplay. Properties modified during gameplay will have no effect.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_isEditable3dPolygon
bool _isEditable3dPolygon()
getDepth
double getDepth()
getMargin
double getMargin()
getPolygon
PoolVector2Array getPolygon()
isDisabled
bool isDisabled()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(CollisionPolygon other)
opEquals
bool opEquals(typeof(null) n)
setDepth
void setDepth(double depth)
setDisabled
void setDisabled(bool disabled)
setMargin
void setMargin(double margin)
setPolygon
void setPolygon(PoolVector2Array polygon)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

depth
double depth [@property getter]
double depth [@property setter]

Length that the resulting collision extends in either direction perpendicular to its polygon.

disabled
bool disabled [@property getter]
bool disabled [@property setter]

If true, no collision will be produced.

margin
double margin [@property getter]
double margin [@property setter]

The collision margin for the generated Shape. See Shape.margin for more details.

polygon
PoolVector2Array polygon [@property getter]
PoolVector2Array polygon [@property setter]

Array of vertices which define the polygon. Note: The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the polygon member.

Static functions

_new
CollisionPolygon _new()

Construct a new instance of CollisionPolygon. Note: use memnew!CollisionPolygon instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta