Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCECOMPONENTS

UCFPartImpactFeedbackComponent

MODULECrushformImpactINCLUDECFPartImpactFeedbackComponent.hPARENTUCFImpactFeedbackComponent

Plays the impacts of the owner's hinged parts (UCFHingeComponent). Local to this machine. A part that swings or came off moves on each machine's own physics and only its detach replicates, so each machine plays what it sees and nothing is relayed. A part's hits go through the body's judgement (UCFImpactFeedbackComponent, its thresholds read against the part's own velocity change) and play EventTag; a swinging part slamming into an end of its travel (UCFHingeComponent::OnStopHit) plays SlamEventTag at the closed end and OpenSlamEventTag at the open end. The hinges are found on the owner when play begins, as UCFDeformComponent finds them: one added later stays silent. Idle on a dedicated server, which runs no hinge physics. The vehicle adapter creates it as CF_PartImpactFeedback when Impact Feedback and Dirt And Dents are both on.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
float ComputeSlamIntensity(float SpeedCmS, float MinSpeedCmS, float SpeedForFullIntensityCmS)
C++ ONLY

Intensity of a slam, 0..1, from a slam's speed at the part's centre of mass, cm/s; negative below MinSpeedCmS.

int32 GetNumWatchedHinges() const
PUREC++ ONLY

Hinges whose parts this component plays; 0 before Begin Play and on a dedicated server.

Properties

FGameplayTag SlamEventTag
Category
Impact
FGameplayTag OpenSlamEventTag
Category
Impact
float SlamSpeedForFullIntensity = 500.f
Default
500.f
Category
Impact
float MinSlamSpeed = 40.f
Default
40.f
Category
Impact

Functions

  • ComputeIntensityIntensity of a hit, 0..1, from the hit's impulse per kilogram of the hit body (that is, its velocity change in cm/s); negative when below MinImpulsePerKg.
  • MakeSourceIdThe id an impact event carries for Primitive, so its cooldown holds whichever node or path the event came by.
  • SetObservedPrimitiveSets the primitive whose hits are reported.
  • GetObservedPrimitiveThe primitive whose hits are reported; null until SetObservedPrimitive is called.