Class LSCompoundCollider2D
Represents one pure 2D collider identity whose collision shape is composed from deterministic internal primitive and convex-polygon parts.
public sealed class LSCompoundCollider2D : LSCollider2D, IRecordable
- Inheritance
-
LSCompoundCollider2D
- Implements
-
IRecordable
- Inherited Members
Constructors
LSCompoundCollider2D(params CompoundColliderPart2D[])
Creates a runtime compound collider from authored pure 2D parts.
public LSCompoundCollider2D(params CompoundColliderPart2D[] parts)
Parameters
partsCompoundColliderPart2D[]
Properties
PartCount
Gets the number of authored compound parts.
public int PartCount { get; }
Property Value
Parts
Gets the authored parts in stable source order.
public ReadOnlySpan<CompoundColliderPart2D> Parts { get; }
Property Value
Priority
Gets the deterministic pure 2D narrow-phase ordering priority.
public override int Priority { get; }
Property Value
ScaledRadius
Gets the radius of a circle that conservatively contains the current aggregate shape.
public Fixed64 ScaledRadius { get; }
Property Value
- Fixed64
Shape
Gets the runtime pure 2D shape family.
public override ColliderType2D Shape { get; }
Property Value
Methods
ContainsPoint(Vector2d)
Gets whether a planar world-space point lies inside this collider.
public override bool ContainsPoint(Vector2d point)
Parameters
pointVector2d
Returns
GetClosestPoint(Vector2d)
Gets the closest representable point on this collider to a planar world-space point.
public override Vector2d GetClosestPoint(Vector2d point)
Parameters
pointVector2d
Returns
- Vector2d
GetPartId(int)
Gets the stable runtime part identifier for a source-order index.
public int GetPartId(int index)
Parameters
indexint
Returns
GetSupportPoint(Vector2d)
Gets the farthest representable point along a planar world-space direction.
public override Vector2d GetSupportPoint(Vector2d direction)
Parameters
directionVector2d
Returns
- Vector2d
OnMaterialChanged()
Updates derived material state after Material changes.
protected override void OnMaterialChanged()