REFERENCEACTORS
ACFBreakableTree
One physical trunk body for its whole life: standing, bending, falling or bent-and-locked, and finally frozen into static geometry.
Standing is a kinematic body with no joint, dormant from BeginPlay -- a level-placed forest costs nothing until UCFPropContactComponent arms it. Yielding is decided by angle: the authority crosses YieldAngleDegrees and commits, while a client predicts the same crossing and starts falling locally with zero latency -- fading the drive spring out is an ordinary, reversible joint mutation, unlike a broken joint or a migrated plastic drive target. A client only releases the joint (FellAndFall's hard finish) once the authority's bYielded actually confirms the prediction; an unconfirmed one rolls back.
A tree can also be drawn by a skinned mesh animated by Dynamic Wind (TrunkSkinnedMesh). It is a pure visual riding the same trunk body: when it has a mesh at construction/BeginPlay, TrunkMesh is hidden and stays only as the physics body and collision proxy, so every rule above still runs on TrunkMesh alone.
Functions
The trunk's physics body and collision proxy. Hidden when TrunkSkinnedMesh draws the tree.
The optional skinned mesh that draws the tree instead of TrunkMesh. May have no mesh assigned.
The per-species tuning asset. Null if none is assigned.
The joint that holds the trunk to the world while the tree is armed.
Whether a nearby vehicle has armed the tree (its joint exists and it simulates physics). Local to this machine: arming is not replicated.
- Category
- Crushform|Tree
Whether the tree has yielded: a felled trunk has started to fall, or a bent pole has reached its stop. Replicated from the authority.
- Category
- Crushform|Tree
Whether the trunk has frozen into static geometry. Replicated from the authority.
- Category
- Crushform|Tree
Respawns so far, wrapping at 256. A counter rather than a flag, so a second respawn is still a change the clients see.
- Category
- Crushform|Tree
Authority only. Stands a yielded tree (fallen, felling or a locked pole) up at once, by the timer's path, whatever the respawn conditions say. Returns false for a standing tree, or when called on a machine that is not the authority.
Whether the last replicated state change (the yield or the settle) is recent enough to be witnessed live. Always true on the authority.
Current bend angle in degrees, measured from the trunk's own live rotation -- never a value tracked separately.
- Category
- Crushform|Tree
Local to this machine. Creates the joint and starts simulating physics, or -- if already armed -- just cancels any pending RequestDisarm(). Idempotent and cheap enough to call every tick for every tree a vehicle is near. Refuses (logging once) if TreeConfig is missing or fails UCFTreeConfig::ValidateTreeConfig, and silently while the tree is out of play (before BeginPlay, or after EndPlay from a streamed-out cell).
Local to this machine. Schedules Disarm() after DisarmDelaySeconds unless something re-Arm()s first. No-op once yielded -- a falling or locked trunk is never turned back into a kinematic body -- and while out of play, as Arm().
Writes the joint's current deflection into every trunk mesh's Custom Primitive Data for the WPO bend material (see BendAmountCpdIndex etc). A cheap no-op while not armed.
Radius in cm within which a vehicle arms the trees around it: ArmMinRadiusCm, or the distance the body covers in DeltaSeconds (clamped to 0.1-0.35 s) at a 3x margin, whichever is larger. Arming must land before collision does, since an unarmed tree is a kinematic wall.
Properties
The trunk's physics body and collision proxy.
- Category
- Crushform|Tree
- Category
- Crushform|Tree
The joint that holds the trunk to the world while the tree is armed.
- Category
- Crushform|Tree
- Category
- Crushform|Tree
Set by the authority when the tree yields (a felled trunk starts to fall, or a bent pole reaches its stop); replicated.
- Default
- false
- Category
- Crushform|Tree
Set by the authority when the trunk freezes into static geometry; replicated.
- Default
- false
- Category
- Crushform|Tree
Events
Each event fires on every machine, from what that machine itself sees, and is not delivered to a player who joins later.
- Category
- Crushform|Tree
Native counterpart of OnHit.
- Category
- Crushform|Tree
Native counterpart of OnYielded.
- Category
- Crushform|Tree
Native counterpart of OnLanded.
- Category
- Crushform|Tree
Native counterpart of OnSettled.
- Category
- Crushform|Tree
Native counterpart of OnRespawned.
- Category
- Crushform|Tree
Native counterpart of OnYieldRolledBack.