reckfellENGINE

CollisionPolygon3D

A node that provides a thickened polygon shape (a prism) to a CollisionObject3D parent.

On this page
class CollisionPolygon3DReckfellSharpInherits Entity3D

A node that provides a thickened polygon shape (a prism) to a CollisionObject3D parent.

A node that provides a thickened polygon shape (a prism) to a CollisionObject3D parent and allows it to be edited. The polygon can be concave or convex. This can give a detection shape to an Area3D or turn a 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.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

CollisionPolygon3DConstructor
# CollisionPolygon3D
C#
public CollisionPolygon3D();

Properties6

DebugColorProperty
# DebugColor
C#
public Color DebugColor { get; set; }

The collision shape color that is displayed in the editor, or in the running project if Debug > Visible Collision Shapes is checked at the top of the editor. Note: The default value is ProjectSettings.debug/shapes/collision/shape_color. The Color(0, 0, 0, 0) value documented here is a placeholder, and not the actual default debug color.

DebugFillProperty
# DebugFill
C#
public bool DebugFill { get; set; }

If true, when the shape is displayed, it will show a solid fill color in addition to its wireframe.

DepthProperty
# Depth
C#
public float Depth { get; set; }

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

DisabledProperty
# Disabled
C#
public bool Disabled { get; set; }

If true, no collision will be produced. This property should be changed with ReckfellObject.SetDeferred.

MarginProperty
# Margin
C#
public float Margin { get; set; }

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

PolygonProperty
# Polygon
C#
public Vector2[] Polygon { get; set; }

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

Methods13

GetDebugColorColor
# GetDebugColor
C#
public Color GetDebugColor();
Returns Color
GetDepthfloat
# GetDepth
C#
public float GetDepth();
Returns float
GetEnableDebugFillbool
# GetEnableDebugFill
C#
public bool GetEnableDebugFill();
Returns bool
GetMarginfloat
# GetMargin
C#
public float GetMargin();
Returns float
GetPolygonVector2[]
# GetPolygon
C#
public Vector2[] GetPolygon();
Returns Vector2[]
IsDisabledbool
# IsDisabled
C#
public bool IsDisabled();
Returns bool
SetDebugColorvoid
# SetDebugColor
C#
public void SetDebugColor(Color color);
Parameters
NameTypeDefault
colorColor—
SetDepthvoid
# SetDepth
C#
public void SetDepth(float depth);
Parameters
NameTypeDefault
depthfloat—
SetDisabledvoid
# SetDisabled
C#
public void SetDisabled(bool disabled);
Parameters
NameTypeDefault
disabledbool—
SetEnableDebugFillvoid
# SetEnableDebugFill
C#
public void SetEnableDebugFill(bool enable);
Parameters
NameTypeDefault
enablebool—
SetMarginvoid
# SetMargin
C#
public void SetMargin(float margin);
Parameters
NameTypeDefault
marginfloat—
SetPolygon2 overloads
# SetPolygon · 1/2
C#
public void SetPolygon(Vector2[] polygon);
Parameters
NameTypeDefault
polygonVector2[]—
# SetPolygon · 2/2
C#
public void SetPolygon(ReadOnlySpan<Vector2> polygon);
Parameters
NameTypeDefault
polygonReadOnlySpan<Vector2>—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.