Table of Contents

Class BreakablePartComponent

Namespace
LibreRally.Vehicle.Physics
Assembly
LibreRally.dll

Monitors the weld constraint each frame and breaks it when the measured constraint force exceeds BreakStrength.

Once broken, the part's BodyComponent becomes a free rigid body that interacts normally with the physics world.

Attach this to the same entity as the WeldConstraintComponent and the part's BodyComponent.

public class BreakablePartComponent : SyncScript, IIdentifiable, ICollectorHolder
Inheritance
SyncScript
BreakablePartComponent
Implements
IIdentifiable
ICollectorHolder
Inherited Members

Properties

BreakStrength

Force threshold (N) above which the part detaches. Sourced from the minimum beamStrength of cross-boundary beams in the jbeam.

public float BreakStrength { get; set; }

Property Value

float

WeldConstraint

The weld constraint to break. Set by VehiclePhysicsBuilder.

public WeldConstraintComponent? WeldConstraint { get; set; }

Property Value

WeldConstraintComponent

Methods

Update()

Monitors the weld constraint and detaches the part when the break threshold is exceeded.

public override void Update()