Table of Contents

Class LSCapsuleCollider2D

Namespace
Gravitas.Colliders
Assembly
Gravitas.dll

Pure 2D capsule collider whose local center segment follows local 2D Y.

public sealed class LSCapsuleCollider2D : LSCollider2D, IRecordable
Inheritance
LSCapsuleCollider2D
Implements
IRecordable
Inherited Members

Constructors

LSCapsuleCollider2D(Fixed64, Fixed64)

Creates a pure 2D capsule with authored dimensions.

public LSCapsuleCollider2D(Fixed64 radius, Fixed64 height)

Parameters

radius Fixed64
height Fixed64

LSCapsuleCollider2D(ColliderShapeDefinition2D)

Creates a runtime capsule from an authored shape definition.

public LSCapsuleCollider2D(ColliderShapeDefinition2D definition)

Parameters

definition ColliderShapeDefinition2D

Properties

AxisLength

Gets the full length of the conceptual center axis.

public Fixed64 AxisLength { get; }

Property Value

Fixed64

Height

Gets or sets the unscaled full end-to-end capsule height.

public Fixed64 Height { get; set; }

Property Value

Fixed64

Radius

Gets or sets the unscaled semicircle radius.

public Fixed64 Radius { get; set; }

Property Value

Fixed64

ScaledRadius

Gets the radius after compound/local scaling.

public Fixed64 ScaledRadius { get; }

Property Value

Fixed64

Shape

Gets the runtime pure 2D shape family.

public override ColliderType2D Shape { get; }

Property Value

ColliderType2D

WorldAxis

Gets the derived normalized world-space direction of the capsule's conceptual center axis. Exact geometry remains authoritative in the collider's planar rigid frame.

public Vector2d WorldAxis { get; }

Property Value

Vector2d

Methods

ContainsPoint(Vector2d)

Gets whether a planar world-space point lies inside this collider.

public override bool ContainsPoint(Vector2d point)

Parameters

point Vector2d

Returns

bool

GetClosestPoint(Vector2d)

Gets the closest representable point on this collider to a planar world-space point.

public override Vector2d GetClosestPoint(Vector2d point)

Parameters

point Vector2d

Returns

Vector2d

GetSupportPoint(Vector2d)

Gets the farthest representable point along a planar world-space direction.

public override Vector2d GetSupportPoint(Vector2d direction)

Parameters

direction Vector2d

Returns

Vector2d

RecordShapeData(IChronicler)

Records derived authored shape data.

protected override void RecordShapeData(IChronicler chronicler)

Parameters

chronicler IChronicler