reckfellENGINE

CapsuleShape3D

A 3D capsule shape used for physics collision.

On this page
class CapsuleShape3DReckfellSharpInherits Shape3D

A 3D capsule shape used for physics collision.

A 3D capsule shape, intended for use in physics. Usually used to provide a shape for a CollisionShape3D. Performance: CapsuleShape3D is fast to check collisions against. It is faster than CylinderShape3D, but slower than SphereShape3D and BoxShape3D.

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

Constructors1

CapsuleShape3DConstructor
# CapsuleShape3D
C#
public CapsuleShape3D();

Properties3

HeightProperty
# Height
C#
public float Height { get; set; }

The capsule's full height, including the hemispheres. Note: The CapsuleShape3D.Height of a capsule must be at least twice its CapsuleShape3D.Radius. Otherwise, the capsule becomes a sphere. If the CapsuleShape3D.Height is less than twice the CapsuleShape3D.Radius, the properties adjust to a valid value.

MidHeightProperty
# MidHeight
C#
public float MidHeight { get; set; }

The capsule's height, excluding the hemispheres. This is the height of the central cylindrical part in the middle of the capsule, and is the distance between the centers of the two hemispheres. This is a wrapper for CapsuleShape3D.Height.

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

The capsule's radius. Note: The CapsuleShape3D.Radius of a capsule cannot be greater than half of its CapsuleShape3D.Height. Otherwise, the capsule becomes a sphere. If the CapsuleShape3D.Radius is greater than half of the CapsuleShape3D.Height, the properties adjust to a valid value.

Methods6

GetHeightfloat
# GetHeight
C#
public float GetHeight();
Returns float
GetMidHeightfloat
# GetMidHeight
C#
public float GetMidHeight();
Returns float
GetRadiusfloat
# GetRadius
C#
public float GetRadius();
Returns float
SetHeightvoid
# SetHeight
C#
public void SetHeight(float height);
Parameters
NameTypeDefault
heightfloat—
SetMidHeightvoid
# SetMidHeight
C#
public void SetMidHeight(float midHeight);
Parameters
NameTypeDefault
midHeightfloat—
SetRadiusvoid
# SetRadius
C#
public void SetRadius(float radius);
Parameters
NameTypeDefault
radiusfloat—
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.