-
Notifications
You must be signed in to change notification settings - Fork 13
Profile Setup
Important
Profiles define the behaviour when applying a Hit React
Tip
Physics Asset constraint profiles are also important for adjusting the result
The included profiles were designed for physics assets that ship with Manny and Quinn so you might already be good to go!
Caution
You can and should modify Hit React Profiles during Play-In-Editor for rapid testing! ✅ ✅ ✅
Blending occurs in 3 stages:
- BlendIn
- BlendHold
- BlendOut
During BlendHold, no change occurs, this lets our character stay at MaxBlendWeight for this duration.
The total duration of a HitReact is defined as TotalTime = BlendIn.BlendTime + BlendHoldTime + BlendOut.BlendTime and this time is linear: Not affected by interpolation or curves.
However, you can modify the applied result of those 3 states by a Mode curve which can cause significant changes in the visual outcome. Experimentation is highly recommended to get great results.
MaxBlendWeight is one of the most important parameters for defining the result. At 1.0 your character is in a complete Ragdoll from the SimulatedBoneName and below. At 0.0 it will not simulate the bones at all. Think of this as the Floppiness parameter!
BoneBlendWeight is an exponential rate where the blend weight of each bone will chase after the result of the blending that you defined with BlendParams. If this is too high then snapping can occur when applying multiple hit reacts at the same time. If its too low you will mitigate the result, because the bones will not catch up to the blending before it starts blending back out again.
Tip
10.0 is a good baseline value and 12.0 is all but guaranteed to snap and 9.0 will dull the result. Make sure to spend time experimenting with this value to get a feel for it.
BoneOverrides is identical to the property found in Bone Data, make sure that you are editing this in the right place! Both of these overrides get appended together when a HitReact is applied. If the values you enter into BoneOverrides is consistent with the application of the profile, you should set it here, however if you want to be able to change the BoneOverrides during runtime then pass it through with BoneData instead.
Tip
For example a character not simulating arm bones while holding a weapon should go in BoneData and not in the Profile
RemapSimulatedBones allows you to change the passed in SimulatedBoneName to anything else. This is particularly useful if using an FHitResult to simulate the bone that was hit but you want specific bones to simulate elsewhere, e.g. remap the hand_l and lowerarm_l to upperarm_l so the entire arm simulated when the hand is hit.
You can assign a PhysicalAnimProfile and ConstraintProfile here. Both are optional. When HitReact is triggered with this profile, it will directly set these on the mesh; there is no additive blending between these profiles at all, they override the previous application.
SubsequentImpulseScalars can be used to reduce the scale of any Impulse that is applied if this profile is re-applied within the given timeframes. This can assist in rapid re-applications remaining more stable as well as not overwhelming your game visually.
Cooldown is a cooldown factored for reapplications of this profile only, if you want to set a cooldown for all profiles then you can change Cooldown on the hit react component itself
MaxBlendHandling is a performance optimization that can sacrifice quality in edge-cases where too many hit reacts are already active. If it is not Disabled you can specify the MaxActiveBlends. If the total number of running HitReacts exceeds this number, then the MaxBlendHandling option will be applied. Blocked means the hit react cannot be applied at all. Impulse Only means the hit react cannot be applied, but it will still apply an impulse that will affect the mesh that is already simulating due to other hit reacts.
LOD Threshold is a performance optimization that prevents the application of HitReacts when the character is too far away.