REFERENCECOMPONENTS
UCFGlassUnitsComponent
The glass of one Crushform body: every UCFGlassComponent of the owner is a unit of two levels (cracked, broken), numbered by name so that all machines agree. The cracks replicate beside the levels; the machine that draws writes them into each pane's Custom Primitive Data, shows a pane broken by hiding it, and plays the crack and break feedback.
Functions
Whether this machine draws the glass: the cracks, the pieces and the sound. False on a dedicated server.
BeginPlay of InDeform: numbers the owner's panes by name, maps followers and door parts, reads their boxes, writes their data.
Whether the owner has any pane.
Any machine: a newer Crushform generation puts every pane back whole and drops every crack of the old one.
Authority: raises the pane by the verdict and records its crack. True if the pane's level or cracks changed.
Impact source: shows the verdict now and waits for the authority; Seq is the report that carries it. True if anything changed.
The authority refused these reports: every pane they predicted goes back now.
Authority, after a hit was applied to the lattice (Hit null: a crush with no contact point, the frame alone). ReachedChunks: bit c for each chunk the hit reached (CFGlass::ToChunkMask). SourceSeq: the report being judged now, 0 for the authority's own hit. bLatticeChanged: the hit moved the lattice; the frame is judged only then, so an old dent is never judged again.
Impact source, on the decoded report and the lattice as drawn with it. True when any pane changes: the report must go.
The pane component of a unit; null for an index with no pane.
- Category
- Crushform|Glass
The pane Primitive is, or the follower it is; INDEX_NONE otherwise.
Where the pane lies, for judging a hit; null for an index with no pane.
Hinge index of the part the pane hangs under, INDEX_NONE on the body.
Whether Crushform may judge the pane: it has a definition and a valid shape, and its part is not off (UCFDeformComponent::IsPartOffOrReportedOff).
Where the pane is now: the body's read pose, or its part's (UCFHingeComponent::GetPartReadPose).
The cracks this machine draws on the pane: the authority's of this generation, each replaced by its own prediction within 1 cm of it (a predicted growth, never smaller than the authority's crack), then its other predictions; at most MaxCracksPerPane.
The shards a broken pane throws, as the shard system takes them: tiles of the definition's pieces laid on the pane's plane nearest the impact, each piece at its pose on its tile and thrown the way the debris pool throws it, from the pane as drawn. Scale is the share of the shards kept, from 0 to 1, taken from the first ones. Returns false, with no shards in OutSpawn, when there is nothing to throw.
Plays a shard system's impact on this pane, from the particle data the system exports: the fastest shard's speed sets the strength, and the pane sounds at most once per UCFBreakableSettings::DebrisImpactCooldownSeconds. A pane that is not broken plays nothing.
Inherited from UCFBreakableUnitsComponent
Functions
- Find
Units The units component Primitive stands for a unit of, and that unit's index: through ICFBreakableUnitPart on the primitive, else the first attach parent that knows the primitive. nullptr when none does.For Primitive - Apply
Hit Authority: applies an outside hit on a primitive to the unit it belongs to.Result On Authority - Predict
Hit Any machine: the prediction twin of ApplyHitResultOnAuthority.Result - Apply
Hit Authority: raises the unit to the level its definition gives this hit (HitResponses), replicates it and plays it.On Authority - Predict
Hit Any machine: shows the hit's level now and waits for the authority; undone after PredictionConfirmTimeoutSeconds. - Get
Unit How many units the owner laid out.Count - Get
Max The highest level a unit can reach, as given to InitUnits; a unit is intact at 0.Level - Get
Unit The level this machine shows: the authority's, or a prediction ahead of it.Level - Get
Confirmed The level the authority confirmed in the current generation.Unit Level - Is
Unit True for a valid index whose shown level is 0; false for an invalid index.Intact - Predict
Unit Shows StoredImpact's level now, ahead of the authority, with the units GatherUnitsRaisedWith adds.Level - Raise
Unit Authority: confirms Level for the unit and the units GatherUnitsRaisedWith adds, replicates it, plays it here and tells OnUnitsRaisedOnAuthority.Level On Authority - Cancel
Prediction Rolls the unit's prediction back to the confirmed level, and with it the predictions of the units GatherUnitsRaisedWith adds. - Apply
Generation Any machine: the first generation this component learns (from here or from its replicated levels) is taken whatever it is; after that a newer one puts every unit back to intact here at once, and an equal or older one is ignored. - Find
Unit The unit the primitive (and the instance of it, ItemIndex) stands for, or INDEX_NONE.For Primitive
Events
- On
Unit Both fire on every machine whenever a unit's shown level changes.Level Changed Native - On
Unit Level Changed