REFERENCECOMPONENTS
UCFHingeComponent
The hinge of a part of the body: a door, a hood, a tailgate, a bumper. Its location is the hinge pin and its Z axis the pin's direction, unless it has Mounts: then the part hangs on one of them, the one the crash left whole (a bumper on the end still bolted on). The part is the one static mesh attached directly under it; whatever goes with the part (glass, a handle) hangs under the part.
UCFDeformComponent decides from the dents around the part and at its pin when it starts to swing and when it comes off; the hinge carries that out on the machine it runs on. Local to this machine: nothing of the hinge replicates.
Functions
Finds the part (FindPart) and records where it sits. False, with a warning, when there is no part or more than one.
The only static mesh attached directly under the hinge, or null when there is none or more than one. InitPart takes it.
Mounts.Num(), or 1 for the hinge itself when there are none.
Pin PinIndex in world space: the mount's transform on the hinge's, or the hinge's own. The pin is its Z axis. An index out of range reads pin 0.
The travel of pin PinIndex, degrees: the mount's Open Angle, or the hinge's. An index out of range reads pin 0.
The pin the part swings on: the one StartSwinging was handed, 0 while attached.
Sum of the swing's turns since StartSwinging, degrees, counting only turns faster than CFHinge::ShakeMinSpeed.
Hangs the part on a joint to the owner's body, about pin PinIndex (GetNumPins; one out of range is pin 0). bBreakable: the joint tears under Break Force or Break Torque (OnTorn), once armed as SetBreakable arms it; only the machine that decides detaches asks for it. False when the part is not attached, the owner has no simulating physics body, or something stands in the part's place (IsPartBlocked).
From now on a swinging part's joint tears under Break Force or Break Torque, or stops tearing. The joint arms once it has carried no more than UCFSettings::ArmLoadShare of either for CFHinge::ArmQuietTime (IsJointArmPending until then). No effect unless the part swings on a joint.
Tells the hinge whether this machine is its owner's impact source, the one that simulates the body; the deform component hands it on every tick (UCFDeformComponent::SyncHingeBreakable). Only there does a swinging part get its Bump Response push: where the body is played back, its network corrections would read as jolts. False until told.
Lets the part fall off and starts its lifetime. Local to this machine. bHideAtOnce hides it instead: it came off before this machine saw the body. A part still in its place stays there, off, while another vehicle is close to the place or something stands in it (IsPartCrowded), or until its cut lands (SetAwaitingCut), and falls once that has moved off.
Puts the part back where the Blueprint put it: no joint, no physics, no collision, visible.
Angle of the part about the active pin from where the Blueprint put it, degrees; it has that pin's Open Angle's sign while opening.
Whether something other than the owner stands in the part's closed place: a vehicle still pressing on the dent it made, a wall. A body made for the part there would be shoved out through the owner's own (the joint keeps the two from touching) and flung once it tore loose; the part keeps still instead.
Whether a vehicle other than the owner is within UCFSettings::TornPartHoldMargin of the part's closed place, or closing in fast enough to be there within TornPartHoldLookahead, or anything stands in the place (IsPartBlocked): the vehicle that tore the part off, still driving in. A part let go then comes off between two bodies both infinitely heavy to it (one-way, LoosenPart) and is shot out or wedged into its own body.
Whether a part that came off still waits in its closed place to fall (Detach): for the body's collision to be cut out of that place (SetAwaitingCut), or while a vehicle is close to it (IsPartCrowded).
Holds a part that came off in its closed place until its cut lands: the body's collision takes the place out of the body first, so the part never falls into the body it came from. False lets it fall, at once unless a vehicle is close to the place (IsPartCrowded).
Whether the part waits for its cut to land (SetAwaitingCut).
Lets a swinging part come off once its cut lands: it keeps swinging on its joint until then, and a joint that tears meanwhile is not put back. Only a part that is swinging takes it; the part then falls off its joint when the cut lands.
Whether a swinging part keeps its joint until its cut lands (BeginDetachAfterCut).
Where the part is in its life: attached, swinging on a joint, or detached.
- Category
- Crushform|Hinge
The static mesh this hinge moves; null before InitPart finds it.
- Category
- Crushform|Hinge
The physics constraint a swinging part hangs on; null unless the part is swinging.
The part's pose where the owner's body reads now, carried onto the body (CFDeform::GetBodyRootTransform): a skeletal root follows its body only in its own EndPhysics tick, a frame's travel behind it in a physics hit, where a dent swings and detaches parts. Attached, from the component, which the owner's root holds. Freshly placed, from PlacedOnBody: in a hit the engine has just moved the component to its body's pose as last set, the lead ahead, and RideUnread brings it back only after physics. Its component's own pose once it follows its own body.
The body whose motion GetPartReadPose follows: the owner's, the part's own once it follows its own body; null for a part with neither.
Whether the joint now stands armed to tear. False without a joint, and while an arm SetBreakable asked for waits for the load to drop.
Whether the joint was asked to arm and waits: it has not yet carried little enough for long enough (SetBreakable).
Whether this machine is the owner's impact source, as last told (SetImpactSourceHere).
Properties
Travel from where the Blueprint put the part (closed) to fully open, degrees about the hinge's Z axis. Its sign picks the side the part opens to. With Mounts, each mount's own Open Angle is used; this one only seeds Add Mount.
- Default
- 70.0f
- Category
- Hinge
Mass of the part while it swings or lies loose, kg.
- Default
- 20.0f
- Category
- Hinge
Overrides the profile's Dented Part Collision for this part.
- Default
- false
- Category
- Hinge
Whether this part, once loose, collides as one hull of its dented collision, in place of the profile's Dented Part Collision. Off: it keeps its static mesh's simple collision exactly as the asset has it, undented, as a concave part such as a bumper wants. Read when play begins: a change on a running vehicle takes effect when it spawns again.
- Default
- false
- Category
- Hinge
Deepest dent around the part, cm, at which it starts to swing. Keep it under Detach Pin Threshold and at or under Detach Mean Threshold.
- Default
- 8.0f
- Category
- Hinge
Mean dent over the part, cm, that takes it off: the part crushed as a whole, not one deep dent in a corner of it. Reaching Detach Pin Threshold instead takes it off too.
- Default
- 20.0f
- Category
- Hinge
Deepest dent within Pin Radius of the pin, cm, that takes it off: what holds the part is crushed. Reaching Detach Mean Threshold instead takes it off too. Keep the lower of the two under the profile's Max Displacement and under the Max Depth of the stiffness zones around the part, or a dent never takes it off (the component logs a warning).
- Default
- 30.0f
- Category
- Hinge
How far from the pin, cm, a dent counts as one at the pin.
- Default
- 40.0f
- Category
- Hinge
Force on the pin, N, that tears a swinging part off: a vehicle running into an open door. 0 never does. The default is twice the measured one: at 4600 N a 1500 kg body at 1 m/s leaves a test door on, at 20 km/h tears it off; parts are tuned to hold harder than that. Only on the machine that decides detaches (the driver's, or the server for a body nobody drives); elsewhere the joint holds and the part comes off through the detach every player gets.
- Default
- 9200.0f
- Category
- Hinge
Torque on the pin, N*m, that tears a swinging part off; 0 never does. As Break Force: twice the measured 2600 N*m.
- Default
- 5200.0f
- Category
- Hinge
Points the part may hang on once loose, in the hinge's space: a bumper's two ends. When the part starts to swing it hangs on the mount whose surroundings are dented least (the first of equals) and swings about that mount's Z axis; a dent at a mount it does not hang on never takes it off. Empty: the part swings about the hinge's own Z axis by Open Angle.
- Category
- Hinge
Overrides the project's Swing Damping for this part.
- Default
- false
- Category
- Hinge
Damping of this part's swing, in place of the project's Swing Damping (Project Settings > Plugins > Crushform).
- Default
- 1.0f
- Category
- Hinge
Overrides the project's Swing Spring for this part.
- Default
- false
- Category
- Hinge
Spring pulling this part back to closed, in place of the project's Swing Spring (Project Settings > Plugins > Crushform). A bumper that hangs on one mount wants none.
- Default
- 0.0f
- Category
- Hinge
Overrides the project's Stop Bounce for this part.
- Default
- false
- Category
- Hinge
Bounce of this part off the ends of its travel, in place of the project's Stop Bounce (Project Settings > Plugins > Crushform).
- Default
- 0.0f
- Category
- Hinge
Overrides the project's Bump Response for this part.
- Default
- false
- Category
- Hinge
Extra push this part gets from its body's jolts, in place of the project's Bump Response (Project Settings > Plugins > Crushform).
- Default
- 0.0f
- Category
- Hinge
Degrees the part must have swung, in all, to be shaken off: a bumper hanging on one mount falls off on a rough road. Counted from the start of the swing, so the part's own opening and the swings that follow it count too: keep it well above the Open Angle of its pins (two to three times), or the part comes off on a smooth road as soon as it has swung for the settle time. Acted on only after the settle time; turns too slow to be a shake (a part trembling at rest) do not count. 0: never shaken off.
- Default
- 0.0f
- Category
- Hinge
Events
On the tick after the joint of a swinging part tore. UCFDeformComponent takes the part off for everyone.
On the tick a swinging part is seen to slam into an end of its travel: the joint's stop, at the closed end where the part meets its own body (the joint keeps the two from touching, so no contact reports it). Local to this machine: it fires on every machine that runs the hinge's physics, from that machine's own swing, and nothing of it replicates.
OnStopHit for Blueprints, with the same hit, told on the world's next timer tick (see On Started Swinging).
- Category
- Crushform|Hinge
The part came loose and starts to swing on its hinge. Fires on every machine that runs the hinge's physics (every machine that draws, never a dedicated server), from what that machine itself sees, and nothing of it replicates. A part crushed off straight from its place comes off without swinging first. Told on the world's next timer tick, as the deform component's On Damage Changed, not inside the call that changed the part: a handler may repair or destroy the vehicle. Get State reads the state now, which a later change may have moved on.
- Category
- Crushform|Hinge
The part came off the body, once per part until a repair. Where, from what and when as On Started Swinging. bHiddenAtOnce: it was already off when this machine first saw the vehicle (a player who joins late, a vehicle replicating in), so it is hidden instead of seen falling: update what the game shows, play no effect. That one is told on the first timer tick after the vehicle's BeginPlay, so Event BeginPlay can bind it.
- Category
- Crushform|Hinge
A swinging or detached part is back where the Blueprint put it: a repair, or a swing whose joint tore on a machine that no longer decides detaches (the part stays on for every player). Where, from what and when as On Started Swinging.
- Category
- Crushform|Hinge