Table of Contents

Class CollisionPolygon3D

Namespace
Godot
Assembly
GodotSharp.dll

A node that provides a thickened polygon shape (a prism) to a CollisionObject3D parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an Area3D or turn PhysicsBody3D into a solid object.

Warning: A non-uniformly scaled CollisionShape3D will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead.

public class CollisionPolygon3D : Node3D, IDisposable
Inheritance
CollisionPolygon3D
Implements
Inherited Members

Constructors

CollisionPolygon3D()

public CollisionPolygon3D()

Properties

Depth

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

public float Depth { get; set; }

Property Value

float

Disabled

If true, no collision will be produced.

public bool Disabled { get; set; }

Property Value

bool

Margin

The collision margin for the generated Shape3D. See Margin for more details.

public float Margin { get; set; }

Property Value

float

Polygon

Array of vertices which define the 2D polygon in the local XY plane.

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 class property.

public Vector2[] Polygon { get; set; }

Property Value

Vector2[]

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool