Skip to content

Misc. Setup

Jared Taylor edited this page Mar 17, 2025 · 6 revisions

Where to Apply Hit React

Your Hit React should be applied from an event that resulted in something happening, whether that is taking damage, walking into someone, or landing after a long fall.

In situations where replication is involved, those events should still be available to all roles, and contain sufficient data to compute everything the Hit React application requires, whether its via GameplayCues or your own implementation. See Replicating Hit Reacts for details.

Physics Asset

Whether Hit React's defaults work well for you will depend on how your physics asset is setup. It was setup for the PA_Mannequin profile included with Manny and Quinn from the Third Person Template.

Adjusting the constraints can make a huge difference. Hit React supports constraint profiles as well as physical animation profiles, if you add a physical animation component to your character, however you should be aware of the limitations.

Disabling Hit React

HitReact can be globally disabled, either immediately and fully, or with interpolation.

You can fully disable the HitReact system by overriding UHitReact::CanHitReact(). This will apply instantly and will cause any in-progress hit reacts to snap. This method of disabling is generally intended for something that is irrelevant or entirely dormant or fully deactivated.

In most cases you probably want to smoothly enable and disable the Hit React System globally.

Bind to the OnHitReactToggleStateChanged event from the HitReactComponent. Call ToggleHitReactSystem().

When the state changes, the event will fire. This allows you to respond to the system completing its disable or enable request when working with interpolation.

If you are not using interpolation to disable/enable, you can generally assume it succeeded immediately.

Clone this wiki locally