Skip to content

CapsuleShape2D

Eduard Gushchin edited this page Jun 21, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.CapsuleShape2D
Namespace Electron2D
Kind class
Category Physics

Overview

Provides a capsule-shaped 2D physics resource.

Syntax

public sealed class Electron2D.CapsuleShape2D : Electron2D.Shape2D

Remarks

The capsule is centered on the owning Electron2D.CollisionShape2D. Its height must stay greater than its diameter.

Thread Safety

This type is not synchronized. Create and mutate resources on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Height Property Gets or sets the full capsule height.
Radius Property Gets or sets the capsule radius.
Electron2D.CapsuleShape2D() Constructor Creates a capsule shape with Electron2D preview defaults.

Member Details

Height

Kind: Property

public System.Single Height { get; set; }

Summary

Gets or sets the full capsule height.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

A positive finite height greater than the capsule diameter.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.CapsuleShape2D

Radius

Kind: Property

public System.Single Radius { get; set; }

Summary

Gets or sets the capsule radius.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

A positive finite radius that fits within Electron2D.CapsuleShape2D.Height.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.CapsuleShape2D

Electron2D.CapsuleShape2D()

Kind: Constructor

public Electron2D.CapsuleShape2D()

Summary

Creates a capsule shape with Electron2D preview defaults.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This constructor is not synchronized. Call it on the main scene thread.

Since

This constructor is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.CapsuleShape2D

Clone this wiki locally