Class LSCompoundCollider
Represents one collider identity whose collision shape is composed from deterministic internal primitive and convex-mesh parts.
public sealed class LSCompoundCollider : LSCollider, IRecordable
- Inheritance
-
LSCompoundCollider
- Implements
-
IRecordable
- Inherited Members
Constructors
LSCompoundCollider(params CompoundColliderPart[])
Creates a runtime compound collider from authored 3D parts.
public LSCompoundCollider(params CompoundColliderPart[] parts)
Parameters
partsCompoundColliderPart[]
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<CompoundColliderPart> Parts { get; }
Property Value
Priority
Gets the deterministic narrow-phase ordering priority.
public override int Priority { get; }
Property Value
ScaledRadius
Gets the bounding circle radius. For boxes, this is half of the diagonal length of the cube
public override Fixed64 ScaledRadius { get; }
Property Value
- Fixed64
The radius.
Shape
Gets the runtime 3D shape family.
public override ColliderType Shape { get; }
Property Value
Methods
ClosestPointOnSurface(Vector3d)
Gets the point on this collider's surface nearest to a world-space point.
public override Vector3d ClosestPointOnSurface(Vector3d other)
Parameters
otherVector3d
Returns
- Vector3d
ColliderOverlapsRay(RaycastSegmentWorker, ref SwiftList<Vector3d>)
Checks if this object overlaps the line formed by p1 and p2
public override bool ColliderOverlapsRay(RaycastSegmentWorker worker, ref SwiftList<Vector3d> outputIntersectionPoints)
Parameters
workerRaycastSegmentWorkerThe prepared ray-axis worker for the owning query service.
outputIntersectionPointsSwiftList<Vector3d>
Returns
GetFrontalArea(Vector3d)
Gets the frontal-area estimate for a world-space direction; the base implementation returns Area.
public override Fixed64 GetFrontalArea(Vector3d direction)
Parameters
directionVector3d
Returns
- Fixed64
GetNormalAtPoint(Vector3d)
The direction pointing outward from the surface of the collider at the point
public override Vector3d GetNormalAtPoint(Vector3d point)
Parameters
pointVector3d
Returns
- Vector3d
GetPartId(int)
Gets the stable runtime part identifier for a source-order index.
public int GetPartId(int index)
Parameters
indexint
Returns
OnMaterialChanged()
Updates derived material state after Material changes.
protected override void OnMaterialChanged()