Skip to content
EvilEngine.Formats.Collision

ColliderShape.Capsule record

public sealed record ColliderShape.Capsule : ColliderShape

A collider shape that’s a capsule, a cylinder with a half sphere on each end, centred on the collider’s origin and running along its Y axis. Its whole length is its Height and twice its Radius.

new Collider(new ColliderShape.Capsule(1.2f, 0.3f), ["solid"])
Assembly
EvilEngine.Formats
Commit
4ff877b1

Members

ColliderShape.Capsule constructor

public ColliderShape.Capsule(float Height, float Radius)

Makes a capsule of height between its ends’ centres and radius.

Height property

public float Height { get; init; }

The distance between the centres of its two round ends, in metres, the length of its straight part. It must be above 0 for the collision to be written.

Radius property

public float Radius { get; init; }

The radius of its straight part and its ends, in metres. It must be above 0 for the collision to be written.