reckfellENGINE

CircleShape2D

Circular 2D collision geometry with an adjustable radius.

On this page
class CircleShape2DReckfellSharpInherits Shape2D

CircleShape2D defines a circle centered at the local origin. Radius is a radius, not a diameter; it starts at 10. GetRect() returns local bounds from (-Radius,-Radius), sized (2×Radius,2×Radius). World position is not included in these bounds.

For a collider, assign the resource to Shape on a CollisionShape2D inside the required CollisionObject2D. Creating the resource alone adds no body to the world. Editing a shared resource affects all its users; create a separate instance for independent dimensions.

Radius and SetRadius change the same value. A new value updates the physics shape and emits Changed; repeating a value emits no signal. Use a positive finite radius. Negative values are rejected, but the Inspector does not replace application input validation.

Dimensions, local bounds, Changed and direct overlap with a rectangle at supplied Transform2D values were checked in the installed engine. Body movement, contact resolution and collider appearance were not tested.

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

Constructors1

CircleShape2DConstructor
# CircleShape2D
C#
public CircleShape2D();

Creates a circle with Radius=10 and local bounds Rect2(-10,-10,20,20). A geometry resource, not an independent physics body.

Properties1

RadiusProperty
# Radius
C#
public float Radius { get; set; }

Circle radius in local 2D units, initially 10. Negative values are rejected; use a positive finite value for a working shape. A change updates the physics shape and emits Changed; assigning the same value does nothing.

Methods2

GetRadiusfloat
# GetRadius
C#
public float GetRadius();

Current radius in local 2D units. Reading does not modify the shape.

Returns float

Current radius in local 2D units. Reading does not modify the shape.

SetRadiusvoid
# SetRadius
C#
public void SetRadius(float radius);

Circle radius in local 2D units, initially 10. Negative values are rejected; use a positive finite value for a working shape. A change updates the physics shape and emits Changed; assigning the same value does nothing.

Parameters
NameTypeDefault
radiusfloat—
radius

New positive finite circle radius in local 2D units.

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.