Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCEDATA ASSETS

UCFTreeConfig

MODULECrushformBreakableINCLUDECFTreeConfig.hPARENTUPrimaryDataAsset

Tuning for one species of breakable tree: mass, yield behaviour, the joint drive, felling, hit and landing events, feedback tags and respawn. Collision geometry comes from the mesh and is not duplicated here.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
bool ValidateTreeConfig(FString& OutError) const
PUREC++ ONLY

Checks only the invariants that would fail silently at runtime. Returns false and fills OutError when one is broken. Callable at runtime, so a tree can refuse to arm on a broken config.

Properties

float MassKg = 900.f
Default
900.f
Category
Crushform|Tree
ECFTreeYieldMode YieldMode = ECFTreeYieldMode::FellAndFall
Default
ECFTreeYieldMode::FellAndFall
Category
Crushform|Tree
float YieldAngleDegrees = 15.f
Default
15.f
Category
Crushform|Tree|Yield
float FellingDriveFadeSeconds = 0.01f

Keep it at or near the minimum. The drive's position strength is still near full at the yield instant and gives a restoring torque far out of proportion to the small angle error that just crossed YieldAngleDegrees; a fade slower than about one frame lets it pull the trunk back below YieldAngleDegrees before the felling damping takes over. A value at or below one frame's delta time (about 0.0167 s at 60 Hz) removes the spring on the first felling step.

Default
0.01f
Category
Crushform|Tree|Felling
float FellingDampingStrength = 3.5e8f

FORCE mode: a raw torque-scale damping coefficient, in the same order of magnitude as DrivePositionStrength and DriveVelocityStrength, not a small fraction of them. The felling pace cannot be derived analytically. With a 900 kg pine trunk and the default drive, the gravity-only floor is about 1.3 s from yield to release (flat up to a damping of about 1e5); the default 3.5e8 gives about 2.7 s, roughly twice that floor. Re-measure for a trunk of another shape or mass (Crushform.Trees.Felling.PacedFall measures the pace on the test trunk).

Default
3.5e8f
Category
Crushform|Tree|Felling
float ReleaseAngleDegrees = 65.f
Default
65.f
Category
Crushform|Tree|Felling
float VehiclePassThroughDelaySeconds = 1.f

FellAndFall only. Timed locally on each machine from the start of felling (a predicting client from its prediction, a confirming client from its confirm); not replicated. Gives a nearby vehicle time to react to the falling trunk before it stops blocking. 0 switches immediately.

Default
1.f
Category
Crushform|Tree|Felling
float StopAngleDegrees = 45.f

BendAndLock only. A per-axis swing limit: Swing1 and Swing2 both get this value, so it is not the plain angle from vertical. A trunk arriving with real velocity settles in the cone's corner, at up to about sqrt(2) times this value (about 63 degrees for a 45 degree config); a slow, quasi-static arrival lands at the nominal value. Author roughly target lean / 1.4 for the worst case and confirm the settled angle in PIE for the strike speed you expect.

Default
45.f
Category
Crushform|Tree|Felling
float BendAndLockLockStrengthMultiplier = 100.f

BendAndLock only. Multiplier of DrivePositionStrength and DriveVelocityStrength while the drive holds the pose the trunk stalled at. The hard cone bounds only how far the trunk tips, not in which direction, so a pole resting at its stop needs far more than the standing-tree strength to keep its direction against a sideways push, and the effect is strongly non-linear. Measured with a 900 kg trunk, StopAngleDegrees 45 and a 2 s push of 8e6 kg*cm/s^2: 1x walked the direction 103 degrees, 10x 82, 30x 61, and 100x held it (5.8 degrees during the push, 1.8 degrees left after release). A multiplier keeps the 1:10 stiffness:damping ratio. Re-measure (Crushform.Trees.Felling.LockedAzimuthHoldsAgainstPush) for another trunk or a stronger push.

Default
100.f
Category
Crushform|Tree|Felling
float YieldConfirmTimeoutSeconds = 0.75f
Default
0.75f
Category
Crushform|Tree|Net
float DrivePositionStrength = 5.0e8f

The restoring spring for the elastic range in both yield modes: a hard cone limit gives no restoring torque inside the cone, so without it a tall trunk topples under its own weight. FORCE mode: a raw torque in kg*cm/s^2, independent of the trunk's moment of inertia. Acceleration mode normalized the spring to the trunk's inertia and made it a wall no vehicle torque could beat (a 6e6 push at bumper height moved a 900 kg trunk 0.66 of the 15 degrees needed). The default 5e8, with DriveVelocityStrength 5e7, is the strongest point of the validated range 5e6 to 5e8 (damping a tenth of stiffness throughout), not its mid-point: 5e7/5e6 stands a 1 degree seed only weakly (4.17 degrees after 15 s) and does not recover from a 15 degree lean, as gravity out-creeps it, while 5e8/5e7 converges (0.83 degrees from the same seed) and still lets the 6e6 push fell the trunk in about 1.3 s. Too weak and the trunk fails to stand under its own weight; too strong and it is a wall again.

Default
5.0e8f
Category
Crushform|Tree|Drive
float DriveVelocityStrength = 5.0e7f

FORCE mode velocity half of the same drive: a raw torque in kg*cm/s per unit angular velocity. Kept at DrivePositionStrength / 10, the ratio validated across the whole range. When retuning for another trunk, keep the ratio and prefer the strongest point that still stands the trunk.

Default
5.0e7f
Category
Crushform|Tree|Drive
float DriveForceLimit = 0.f
Default
0.f
Category
Crushform|Tree|Drive
float BendWpoScale = 1.f
Default
1.f
Category
Crushform|Tree|Visual
bool bFallenTrunkCollidesWithVehicles = false
Default
false
Category
Crushform|Tree|Vehicles
float HitMinDeltaVCmS = 30.f
Default
30.f
Category
Crushform|Tree|Events
float HitFullIntensityDeltaVCmS = 400.f
Default
400.f
Category
Crushform|Tree|Events
float HitCooldownSeconds = 0.3f
Default
0.3f
Category
Crushform|Tree|Events
float LandMinDeltaVCmS = 80.f
Default
80.f
Category
Crushform|Tree|Events
float LandFullIntensityDeltaVCmS = 600.f
Default
600.f
Category
Crushform|Tree|Events
FGameplayTag HitFeedbackTag
Category
Crushform|Tree|Feedback
FGameplayTag YieldFeedbackTag
Category
Crushform|Tree|Feedback
FGameplayTag LandFeedbackTag
Category
Crushform|Tree|Feedback
float RespawnDelaySeconds = 300.f
Default
300.f
Category
Crushform|Tree|Respawn
float RespawnClearRadiusCm = 4000.f
Default
4000.f
Category
Crushform|Tree|Respawn
TArray<TEnumAsByte<ECollisionChannel>> RespawnBlockingObjectTypes = { ECC_Vehicle, ECC_Pawn, ECC_PhysicsBody }
Default
{ ECC_Vehicle, ECC_Pawn, ECC_PhysicsBody }
Category
Crushform|Tree|Respawn
bool bRespawnOnlyWhenUnseen = true
Default
true
Category
Crushform|Tree|Respawn
float RespawnUnseenHalfAngleDegrees = 70.f
Default
70.f
Category
Crushform|Tree|Respawn
float RespawnUnseenDistanceCm = 15000.f
Default
15000.f
Category
Crushform|Tree|Respawn
float RespawnSinkSeconds = 3.f
Default
3.f
Category
Crushform|Tree|Respawn