Ragdoll reference¶
The ragdoll core component and its two movement adapters, on both pawns. Add AC_RagdollSystem_Mover to a Mover pawn or AC_RagdollSystem_CMC to a Character pawn: both inherit every setting of AC_RagdollSystem_Base.
How to read these tables
Settings are the values you tune: select the component in your pawn Blueprint (or open the asset) and look in the Details panel under the category shown. Runtime state is written by the system while it runs; read it, do not set it. Functions marked pure have no execution pins. The descriptions are the same as the Details panel tooltips. Default is the class default; where a sample pawn sets a different value on its component, the description says so ().
AC_RagdollSystem_Base¶
/GASPALS/Systems/RagdollSystem/AC_RagdollSystem_Base · parent ActorComponent
Settings¶
Ragdoll > Entry¶
| Variable | Type | Default | Description |
|---|---|---|---|
Left Leg BonesLeftLegBones | Array of Name | thigh_l, calf_l, foot_l | Left leg bodies that collide with RightLegBones during ragdoll, so the legs do not pass through each other. Set per skeleton. |
Right Leg BonesRightLegBones | Array of Name | thigh_r, calf_r, foot_r | Right leg bodies that collide with LeftLegBones during ragdoll. Set per skeleton. |
Default Ragdoll Montage Blend OutDefaultRagdollMontageBlendOut | MontageBlendSettings | Montage blend-out used when the ragdoll stops the active montages: the ragdoll input (HandleRagdollInput), an obstacle hit (TraceForObstacles), and on the Mover pawn the Ragdoll mode entry on machines that have not applied the ragdoll physics yet (ApplyModeEnterPhysics). |
Ragdoll > General¶
| Variable | Type | Default | Description |
|---|---|---|---|
Enable RagdollbEnableRagdoll | Boolean | true | Turns the ragdoll system on or off (read at start, default only). Off: StartRagdoll and the ragdoll input do nothing. |
Ragdoll > Get Up¶
| Variable | Type | Default | Description |
|---|---|---|---|
Auto Get UpbAutoGetUp | Boolean | true | Characters without a player get up by themselves once the body has rested for AutoGetUpDelay (server only). Off: they stay down until something calls RequestGetUp. |
Auto Get Up DelayAutoGetUpDelay | Float | 3 | Seconds the body must rest before an automatic get-up. Default 3. |
Auto Get Up Max SpeedAutoGetUpMaxSpeed | Float | 30 | Speed in cm/s of the spine_05 body (RagdollSpeed) under which the body counts as resting. Default 30. |
Ragdoll > Motion¶
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll Gravity MultiplierRagdollGravityMultiplier | Float | 1 | Gravity multiplier on every ragdoll body (UpdateGravity, needs the PhysicsControl component); gravity is turned off once the body falls faster than 2500 cm/s. |
Ragdoll Roll TorqueRagdollRollTorque | Float | 100000 | Torque (degrees, acceleration change) applied to spine_05 per unit of roll force (move input while ragdolling, plus the automatic roll on slopes). 0 turns rolling off. Default 100000. |
Ragdoll Auto Roll Slope MinRagdollAutoRollSlopeMin | Float | 20 | Floor angle (degrees) where the automatic roll down slopes starts. Default 20. |
Ragdoll Auto Roll Slope MaxRagdollAutoRollSlopeMax | Float | 30 | Floor angle (degrees) where the automatic roll down slopes reaches full strength. Default 30. |
Ragdoll > Obstacles¶
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll on Obstacle HitbRagdollOnObstacleHit | Boolean | true | Ragdoll when an obstacle hits the body (TraceForObstacles, every tick on the locally controlled owner while not ragdolling). Off: obstacles only push the capsule. Default on. |
Ragdoll Obstacle Object TypesRagdollObstacleObjectTypes | Array of EObjectTypeQuery | ObjectTypeQuery7 | Object types that knock the character over (TraceForObstacles sweeps from neck_01 to between the feet). Default Obstacle: the moving obstacles of RagdollLevel (ObstaclePreset profile). |
Ragdoll Obstacle Trace RadiusRagdollObstacleTraceRadius | Float | 15 | Radius in cm of the obstacle sweep along the body. Default 15. |
Ragdoll > Physics¶
| Variable | Type | Default | Description |
|---|---|---|---|
Physics Control Kinematic Tick IntervalPhysicsControlKinematicTickInterval | Float | 0.25 | Tick interval (seconds) of the pawn's Physics Control component while the Kinematic profile is applied. In that profile every control is off and the component only re-targets the kinematic bodies to their bones, which the skeletal mesh already does, so it can tick slowly. The other profiles (Ragdoll, PhysicalAnimation) always tick every frame. 0 = every frame. Default 0.25. |
Ragdoll > Replication¶
| Variable | Type | Default | Description |
|---|---|---|---|
Remote Sync StiffnessRemoteSyncStiffness | Float | 25 | Spring strength pulling a remote copy of the ragdoll (a machine that does not drive it) toward the replicated capsule position, on the pelvis. Default 25. |
Remote Sync DampingRemoteSyncDamping | Float | 10 | Damping of the remote ragdoll pull (see RemoteSyncStiffness). Default 10. |
Ragdoll > Settle¶
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll Settle SpeedRagdollSettleSpeed | Float | 15 | Spine speed (cm/s) below which the ragdoll counts as lying still. |
Ragdoll Settle DelayRagdollSettleDelay | Float | 0.3 | Seconds the ragdoll must stay below RagdollSettleSpeed before the physics control strengths fade out. |
Ragdoll Settle Blend TimeRagdollSettleBlendTime | Float | 0.5 | Seconds to fade the physics control strengths to 0 once the ragdoll has settled (they come back 4x faster when the body moves again). Fading them out keeps the arms from chasing the animation pose, which would make the hands shake. |
Ragdoll Settle Wake SpeedRagdollSettleWakeSpeed | Float | 60 | Once the ragdoll has settled (below Ragdoll Settle Speed for Ragdoll Settle Delay), only a spine speed above this (cm/s) wakes its physics controls again. Stops the limbs that drop as the controls fade from waking them again, which kept bodies twitching on the ground and delayed the auto get-up. Never below Ragdoll Settle Speed. |
Runtime state (32 variables)
| Variable | Type | Default | Description |
|---|---|---|---|
Pending Ragdoll ImpulsePendingRagdollImpulse | Vector | (0, 0, 0) | Impulse waiting for the body to switch to the Ragdoll profile before it is applied (TryApplyPendingImpulse, 1 s expiry). |
Pending Ragdoll Impulse BonePendingRagdollImpulseBone | Name | Bone that receives PendingRagdollImpulse. | |
Pending Ragdoll Impulse TimePendingRagdollImpulseTime | Float | 0 | Game time when PendingRagdollImpulse was received (expires after 1 s). |
Ragdoll Spine VelocityRagdollSpineVelocity | Vector | (0, 0, 0) | Linear velocity of the spine_05 body while ragdolling (UpdateVelocities); feeds the impact prediction. |
Ragdoll SpeedRagdollSpeed | Float | 0 | Speed of the spine_05 body while ragdolling: the settle and the automatic get-up read it. |
Ragdoll Time to ImpactRagdollTimeToImpact | Float | 0 | Time until the predicted impact of the falling body (projectile path from the spine velocity, UpdateImpactDirection). |
Ragdoll Impact DirectionRagdollImpactDirection | Vector2D | (0, 0) | Direction of the predicted impact relative to the RagdollTrace socket, as yaw (X) and pitch (Y) in degrees, read by the Anim Blueprint for bracing. |
Ragdoll COMLast FrameRagdollCOMLastFrame | Vector | (0, 0, 0) | Skeletal center of mass of the previous frame, for RagdollCOMVelocity. |
Ragdoll COMVelocityRagdollCOMVelocity | Vector | (0, 0, 0) | Velocity of the skeletal center of mass while ragdolling (UpdateVelocities). Above 150 cm/s horizontally the get-up uses the rolling variants (PlayRollingGetups); falling faster than 2500 cm/s turns the ragdoll gravity off (UpdateGravity). |
Ragdoll Roll InputRagdollRollInput | Vector | (0, 0, 0) | Roll input of the ragdoll: the owner's move input, or on other machines the replicated value (UpdateRollInput). |
Ragdoll Roll ForceRagdollRollForce | Vector | (0, 0, 0) | Roll force of this frame: the roll input plus the automatic roll, clamped to 1 (UpdateRollBehavior). |
Ragdoll Auto Roll ForceRagdollAutoRollForce | Vector | (0, 0, 0) | Automatic roll force down the slope, smoothed (UpdateRollBehavior). |
Parent PawnParentPawn | Pawn ref | Owning pawn; set by InitializeSystem. | |
Parent MeshParentMesh | SkeletalMeshComponent ref | Skeletal mesh of the owning pawn that is simulated while ragdolling. | |
Parent CapsuleParentCapsule | CapsuleComponent ref | Capsule of the owning pawn; its collision is disabled during the ragdoll and its half height places the actor on the ground. | |
Physics ControlPhysicsControl | PhysicsControlComponent ref | The owner's PhysicsControl component, found by InitializeSystem. Without one the ragdoll is limp: no Kinematic / Ragdoll profiles, curve strengths, settle or gravity multiplier. | |
Owner Set UpbOwnerSetUp | Boolean | false | True once InitializeSystem has bound the owner events and created the physics controls, so a second call (the CMC pawn initializes its systems again after a visual override change) does not create them twice. |
Default Physics ProfileDefaultPhysicsProfile | Name | Kinematic | Physics Control profile used outside ragdoll: Kinematic, or PhysicalAnimation when DDCVar.CharacterPhysics.DefaultProfile is 1 (UpdateDefaultPhysicsProfileFromCvar). |
Applied Physics ProfileAppliedPhysicsProfile | Name | The Physics Control profile currently invoked (Kinematic, PhysicalAnimation or Ragdoll), set by SetPhysicsProfile. | |
Loaded Physics Control AssetLoadedPhysicsControlAsset | Object ref | The PhysicsControl component's Physics Control Asset, kept loaded from InitializeSystem. The component only holds it through a soft pointer, so without this reference a packaged game unloads it at the first garbage collection and the ragdoll profiles stop applying. | |
Default Capsule ProfileDefaultCapsuleProfile | Name | The capsule collision profile the owner had at InitializeSystem; the get-up restores it. | |
Ragdoll Settle AlphaRagdollSettleAlpha | Float | 0 | How settled the ragdoll is, 0 (moving) to 1 (still): the physics control strengths are scaled by 1 - this. |
Ragdoll Settle TimerRagdollSettleTimer | Float | 0 | Seconds the ragdoll has stayed below RagdollSettleSpeed. |
Last Ragdoll Sound TimeLastRagdollSoundTime | Float | -1 | Game time of the last ragdoll impact sound (OnRagdollHit plays at most one every 0.3 s). |
Is RagdollingbIsRagdolling | Boolean | false | True while the character is ragdolling; UpdateRagdollSystem runs the ragdoll motion (UpdateRagdollMotion) every tick while set, and the obstacle trace otherwise. |
Ragdoll on GroundRagdollOnGround | Boolean | false | True when there is floor under the ragdoll, updated every tick by UpdateRagdollFloor (base: a line trace below the pelvis; Mover adapter: the Mover floor query; CMC adapter: also the server capsule trace). RequestGetUp only gets the character up while it is true. |
Ragdoll Face UpRagdollFaceUp | Boolean | false | True when the pelvis faces up (lying on the back); picks the back or front get-up montages. |
Auto Get Up Still TimeAutoGetUpStillTime | Float | 0 | Seconds the ragdoll has rested, for the automatic get-up (UpdateAutoGetUp): counts up while RagdollSpeed is under AutoGetUpMaxSpeed and back down while the body moves faster. Reset to 0 when the get-up is requested, by PrepareGetUp, and while the automatic get-up does not apply (players, clients, bAutoGetUp off). |
Ragdoll Injury StateRagdollInjuryState | E_RagdollInjuryState | None | Injury state of the current ragdoll (read by the Anim Blueprint through the ragdoll properties); reset on the get-up. Replicated. (replicated) |
Freeze Capsule RotationbFreezeCapsuleRotation | Boolean | false | True for 0.25 s after the ragdoll starts, so the capsule keeps its rotation while the body starts to fall. |
Ragdoll Floor NormalRagdollFloorNormal | Vector | (0, 0, 0) | Normal of the floor under the ragdoll (UpdateRagdollFloor), for the automatic roll on slopes. |
Debug StateDebugState | Integer | 0 | DDCVar.CharacterPhysics.DrawDebug, read every frame; draws the obstacle, impact and roll debug shapes when above 0. |
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
NotifyRagdollListeners | bRagdolling (Boolean) | Calls OnRagdollStateChanged on the owner's components implementing BPI_RagdollSystemListener (the camera, for example), then on the owner's controller when it implements it (the NPC AI controller). | |
ChooseGetUpMontage | Montage (AnimMontage ref), StartTime (Float) | Picks the get-up montage and start time from CHT_GetUpMontages (pose history, rolling or not). | |
GetCapsuleProfileToRestore (pure) | ProfileName (Name) | The capsule profile cached by InitializeSystem, or CharacterCapsule when none was cached. | |
PlayRollingGetups (pure) | bRolling (Boolean) | True when the body's center of mass moves faster than 150 cm/s: the get-up uses the rolling variants. | |
PrepareGetUp | Get-up on every machine: resets the injury state and AutoGetUpStillTime, restores the capsule profile (GetCapsuleProfileToRestore), saves the Ragdoll pose snapshot (the Anim Blueprint blends out from it) and feeds the pose history from the mesh. | ||
UpdateAutoGetUp | Server, characters without a player, bAutoGetUp on: counts the time the body rests (RagdollSpeed under AutoGetUpMaxSpeed) up, and back down while it moves faster (short twitches of a settling body do not restart the count), and asks for the get-up once it reaches AutoGetUpDelay; the get-up only happens on a floor, else it retries. | ||
TryApplyPendingImpulse | Applies PendingRagdollImpulse once the body uses the Ragdoll profile, then clears it; drops it after 1 s. | ||
HandleRagdollInput | Ragdoll input: while ragdolling asks for the get-up (only on a floor), otherwise ragdolls the character. | ||
TraceForObstacles | Locally controlled, not ragdolling, bRagdollOnObstacleHit on: sweeps from the neck to the feet for RagdollObstacleObjectTypes and asks for the ragdoll on a hit. | ||
ApplyProfileBodySettings | PhysicsProfile (Name) | Leg-to-leg collision and constraint profile for a physics profile: Kinematic disables the collision between LeftLegBones and RightLegBones and uses the Free constraints; Ragdoll enables it and restores the default constraints. | |
ApplyRagdollPhysics | bStopMontages (Boolean), MontageBlendOut (MontageBlendSettings) | Starts the ragdoll physics on this machine: stops the active montages (optional), simulates the mesh and applies the Ragdoll physics profile. | |
InvokeControlProfileIfValid | PhysicsProfile (Name) | Invokes the Physics Control profile when the owner has a PhysicsControl component. | |
OnDDCvarChanged | CVarName (String) | Data-driven console variable changed: updates the default physics profile when it was DDCVar.CharacterPhysics.DefaultProfile. | |
ResetParentSpaceControls | Get-up: sets the ParentSpace controls to zero strength and zero target velocity multipliers, so the get-up does not inherit the ragdoll velocities. Needs the PhysicsControl component. | ||
RestoreDefaultPhysicsProfile | Applies DefaultPhysicsProfile unless the character is ragdolling again. | ||
SetPhysicsProfile | PhysicsProfile (Name) | Applies a physics profile: stores it in AppliedPhysicsProfile, invokes it on the PhysicsControl component when there is one, then sets the leg-to-leg collision and constraint profile (Kinematic: off, Free; Ragdoll: on, default). In the Kinematic profile the PhysicsControl component ticks every Physics Control Kinematic Tick Interval seconds; every frame otherwise. | |
SimulateRagdollBodies | bHandled (Boolean) | Starts simulating every mesh body for the ragdoll (SetSimulatePhysics), called by ApplyRagdollPhysics; adapters can override it. The CMC adapter starts its bodies in ActivateRagdoll instead (the bodies below the pelvis), because it moves the capsule onto the body every frame. | |
StopActiveMontages | bStopMontages (Boolean), MontageBlendOut (MontageBlendSettings) | Stops every active montage with the given blend-out when bStopMontages is set. | |
UpdateDefaultPhysicsProfileFromCvar | Reads DDCVar.CharacterPhysics.DefaultProfile (0 Kinematic, 1 PhysicalAnimation) into DefaultPhysicsProfile and applies it unless the character is ragdolling. | ||
ApplyCurveStrengths | In the Ragdoll profile: scales the legs, arms, torso and head control strengths by the Ragdoll_Strength_* animation curves and the settle scale. | ||
GetRagdollStrengthScale (pure) | Scale (Float) | Multiplier for the ragdoll physics control strengths: 1 - RagdollSettleAlpha. | |
GetSettleSpeedThreshold (pure) | ReturnValue (Float) | Speed under which the ragdoll counts as still for the settle timer: Ragdoll Settle Speed until it has settled, then Ragdoll Settle Wake Speed (hysteresis). | |
UpdatePhysicsStrengthsFromCurves | Every frame, after the Anim Blueprint: updates the settle, then scales the ragdoll control strengths by the curves. | ||
UpdateSettle | Every frame: tracks how long the ragdoll has been still (RagdollSpeed under RagdollSettleSpeed) and moves RagdollSettleAlpha toward 1 (settled) or back to 0 (moving). | ||
BindOwnerEvents | Binds the mesh hit event (ragdoll impact sounds) and the data-driven console variable changes (default physics profile). | ||
InitializeSystem | ParentPawn (Pawn ref), ParentMesh (SkeletalMeshComponent ref), ParentCapsule (CapsuleComponent ref) | bInitialized (Boolean) | Stores the owner references and checks them (ValidateSetup): with a missing pawn, mesh or capsule it returns false and the ragdoll stays off. Otherwise it finds the owner's PhysicsControl component, caches the capsule collision profile, runs SetupOwnerOnce (tick after the mesh, owner events, physics controls, default profile) and returns true. Call from the owner's initialization; adapters extend it (parent call first) to find their movement component. |
SetupOwnerOnce | First InitializeSystem call only: ticks after the mesh, binds the owner events, creates the physics controls and applies the default physics profile. | ||
SetupPhysicsControl | With a PhysicsControl component: creates its controls and body modifiers from its Physics Control Asset, keeps the asset loaded (LoadedPhysicsControlAsset) and makes it tick after this component. | ||
ValidateSetup | bValid (Boolean) | Checks the owner references set by InitializeSystem. Missing pawn, mesh or capsule: an on-screen and log warning, the ragdoll stays off (returns false). No PhysicsControl component on the owner: a warning, the ragdoll works as a plain limp ragdoll without physical animation, settling or roll. | |
OnRagdollHit | HitComponent (PrimitiveComponent ref), OtherActor (Actor ref), OtherComp (PrimitiveComponent ref), NormalImpulse (Vector), Hit (HitResult) | Mesh hit while ragdolling: plays the ragdoll impact sound, louder with the bone speed (above 50 cm/s and a 100 impulse, at most every 0.3 s). | |
PlayRagdollSound | Volume (Float) | Plays the Foley.Event.Ragdoll event on the owner's AC_FoleyEvents component, when it has one. | |
GetPropertiesForRagdoll (pure) | Properties (S_RagdollProperties) | Ragdoll values for the Anim Blueprint (S_RagdollProperties): speed, time to impact, roll amount, impact direction, injury state. | |
IsRagdolling (pure) | bIsRagdolling (Boolean) | True while the character is ragdolling. | |
IsRemoteCopy | bRemote (Boolean) | True on a machine that does not drive this ragdoll, so its body is pulled toward the replicated capsule (SyncRemoteBody). Base: the locally controlled machine drives it, or the server for a character without a player. The CMC adapter overrides it: only the server drives. | |
ApplyRollTorque | Turns the roll force into a torque on spine_05 (RagdollRollTorque) while the body simulates. | ||
SyncRemoteBody | Machines that do not drive this ragdoll (IsRemoteCopy): pulls the pelvis toward the replicated capsule position (RemoteSyncStiffness, RemoteSyncDamping). | ||
UpdateGravity | Applies RagdollGravityMultiplier to every body, or no gravity once the body falls faster than 2500 cm/s (needs the PhysicsControl component). | ||
UpdateImpactDirection | Predicts where the falling body lands (projectile path from the spine velocity) and stores the time to impact and the impact direction for the Anim Blueprint. | ||
UpdateRagdollFloor | bOnGround (Boolean) | Finds the floor under the ragdoll and stores RagdollOnGround and RagdollFloorNormal. Base: a line trace below the pelvis; adapters can override it (the Mover adapter uses the Mover floor query). | |
UpdateRagdollMotion | Per tick while ragdolling: velocities, floor, impact prediction, roll, gravity, remote body pull, pending impulse and the automatic get-up. | ||
UpdateRagdollSystem | DeltaTime (Float) | Per tick: reads the debug console variable, updates the physics strengths, then either the ragdoll motion (ragdolling) or the obstacle trace. | |
UpdateRollBehavior | Roll force of the ragdoll: the roll input plus an automatic roll down slopes steeper than RagdollAutoRollSlopeMin, then the torque on the spine. | ||
UpdateRollInput | RollInput (Vector) | Returns the roll input of this frame. Base: the owner's last movement input on its machine, else the stored value; adapters override it. | |
UpdateVelocities | Updates the center of mass velocity and the spine_05 velocity and speed of the ragdoll. |
Events¶
FinishGetUp: custom event.OnMeshHit(HitComponent (PrimitiveComponent ref), OtherActor (Actor ref), OtherComp (PrimitiveComponent ref), NormalImpulse (Vector), Hit (HitResult)): custom event.Multicast_ApplyRagdollImpulse(BoneName (Name), Impulse (Vector)): Multicast RPC, reliable.
AC_RagdollSystem_Mover¶
/GASPALS/Systems/RagdollSystem/AC_RagdollSystem_Mover · parent AC_RagdollSystem_Base_C · implements BPI_RagdollSystem_C
Settings¶
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll Mode NameRagdollModeName | Name | Ragdoll | Name of the Mover movement mode that ragdolls (BP_MovementMode_Ragdoll in the pawn's CharacterMover Movement Modes). Default Ragdoll. |
Get Up Mode NameGetUpModeName | Name | Walking | Movement mode the get-up switches to. Default Walking. |
Runtime state (6 variables)
| Variable | Type | Default | Description |
|---|---|---|---|
Enter Stop MontagesbEnterStopMontages | Boolean | false | Whether the pending ragdoll entry stops the active montages (TriggerRagdoll's bStopActiveMontages). |
Enter Montage Blend OutEnterMontageBlendOut | MontageBlendSettings | Montage blend-out of the pending ragdoll entry (TriggerRagdoll's MontageBlendOut). | |
Owner Move InputOwnerMoveInput | Vector | (0, 0, 0) | The owner's move input of its last Mover input (WriteInputs), used as the ragdoll roll input on the owning machine. |
Character MoverCharacterMover | CharacterMoverComponent ref | The owner's CharacterMoverComponent, found by InitializeSystem. | |
Pending Suggested ModePendingSuggestedMode | Name | Movement mode the owner asks for in its next Mover input (RagdollModeName or GetUpModeName), set by RequestMovementMode or ExitRagdoll and written then cleared by WriteRequestToInput. None when nothing is pending. | |
Ragdoll Inputs Pre SimRagdollInputs_PreSim | S_MoverCustomInputs_Ragdoll | Ragdoll data the owner sends in its Mover input (S_MoverCustomInputs_Ragdoll): ragdoll target transform, roll amount, chosen get-up montage and start time. |
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
ApplyRagdollImpulse | BoneName (Name), Impulse (Vector) | bHandled (Boolean) | Impulse on a ragdoll body (on every machine where the ragdoll replicates it). (BPI_RagdollSystem) |
InitializeSystem | ParentPawn (Pawn ref), ParentMesh (SkeletalMeshComponent ref), ParentCapsule (CapsuleComponent ref) | bInitialized (Boolean) | |
IsRagdollActive | bRagdolling (Boolean) | True while the character is ragdolling. (BPI_RagdollSystem) | |
RequestGetUp | bHandled (Boolean) | Ends the ragdoll and plays the get-up, only while ragdolling with the body resting on a floor. Returns false otherwise (a mid-air press does nothing). Called by the ragdoll input (X) and the jump input (Space). (BPI_RagdollSystem) | |
RequestRagdoll | bStopActiveMontages (Boolean), MontageBlendOut (MontageBlendSettings), InjuryState (Byte) | bHandled (Boolean) | Ragdoll the character (InjuryState: E_RagdollInjuryState as byte). Returns false when the ragdoll system is disabled. (BPI_RagdollSystem) |
UpdateRagdollFloor | bOnGround (Boolean) | ||
UpdateRollInput | RollInput (Vector) | ||
ApplyEnterPhysicsOnAuthority | Server: applies the ragdoll physics with the pending entry settings. | ||
ApplyModeEnterPhysics | Ragdoll mode entry: applies the ragdoll physics on this machine (stopping the montages with DefaultRagdollMontageBlendOut) unless the Ragdoll profile is already applied, as on the server after ApplyEnterPhysicsOnAuthority. | ||
ChooseGetUp | Owner: picks the get-up montage and stores it in the ragdoll input, so the server plays the same one. | ||
EnterRagdollMode | Ragdoll mode entered (every machine): capsule profile ignoring pawns, ragdoll physics, listeners notified. | ||
ExitRagdoll | Ends the ragdoll: the owner picks the get-up montage and asks for GetUpModeName through its input; the server queues the mode for characters it drives. | ||
GetExitGetUp | UseReplicated (Boolean), SkipMontage (Boolean), Montage (AnimMontage ref), StartTime (Float) | The get-up montage and start time sent in the last Mover input (owner or server only), for the mode exit. | |
Get_RagdollTargetOrientation (pure) | ReturnValue (Vector) | Facing the ragdoll capsule follows: the actor forward while the capsule rotation is frozen, the body velocity direction while rolling, else the ragdoll input target. | |
Get_RagdollTransform (pure) | ReturnValue (Transform) | Ragdoll target transform: the pelvis position with the facing taken from the pelvis-to-spine direction (flipped when lying on the back). | |
IsInRagdollMode (pure) | bInRagdollMode (Boolean) | True while the CharacterMover is in RagdollModeName. | |
OnMovementModeChanged | PreviousMovementModeName (Name), NewMovementModeName (Name) | bHandled (Boolean) | Call from the pawn's mode change event: entering RagdollModeName starts the ragdoll on this machine, leaving it plays the get-up. Returns true when it handled a ragdoll mode change. |
RefreshRollInput | Owner: the move input is the roll input (and is sent in the ragdoll input); other machines read it from the last Mover input. | ||
RequestMovementMode | ModeName (Name) | Mode request: the owner writes it into its next Mover input (PendingSuggestedMode, applied in the simulation by BP_MovementTransition_SuggestedMode); the server queues it for characters it drives. | |
StoreGetUpChoice | Montage (AnimMontage ref), StartTime (Float) | Writes the chosen get-up montage and start time into RagdollInputs_PreSim. | |
TriggerRagdoll | bStopActiveMontages (Boolean), MontageBlendOut (MontageBlendSettings), InjuryState (Byte) | Starts the ragdoll (owner or server): stores the injury state and entry settings, then enters the Ragdoll mode at once, or after 0.5 s for a remote player playing a montage. | |
TriggerRagdollNow | Not in the Ragdoll mode yet: the server applies the ragdoll physics, the owner asks for the mode through its Mover input (the server queues it for characters it drives), and the capsule rotation freezes for 0.25 s. | ||
WriteInputs | InCmd (MoverInputCmdContext), MoveInput (Vector) | InputCmdResult (MoverInputCmdContext) | Call from the pawn's ProduceInput with the input command and its move input: writes the mode request and, while ragdolling, the ragdoll target and orientation into the command. |
WriteRequestToInput | InCmd (MoverInputCmdContext) | OutCmd (MoverInputCmdContext) | Writes PendingSuggestedMode into the Mover input (then clears it) and, when entering the ragdoll, the ragdoll target transform. |
FindCharacterMover | Finds the owner's CharacterMoverComponent (InitializeSystem). |
Events¶
TriggerRagdollDelayed: custom event.FreezeCapsuleRotation: custom event.OnRagdollModeExit: custom event.
AC_RagdollSystem_CMC¶
/GASPALS/Systems/RagdollSystem/AC_RagdollSystem_CMC · parent AC_RagdollSystem_Base_C · implements BPI_RagdollSystem_C
Settings¶
Ragdoll > Entry¶
| Variable | Type | Default | Description |
|---|---|---|---|
Inherited Velocity ScaleInheritedVelocityScale | Float | 1 | Share of the movement velocity the ragdoll keeps when it starts (1 = keeps its momentum, 0 = drops in place). |
Ragdoll > Get Up¶
| Variable | Type | Default | Description |
|---|---|---|---|
Get Up Back DefaultGetUpBack_Default | AnimMontage ref | M_Neutral_GetUp_Back_Montage_Default | Get-up montage when lying on the back with no item or an unlisted item. |
Get Up Back RHGetUpBack_RH | AnimMontage ref | M_Neutral_GetUp_Back_Montage_RH | Get-up montage when lying on the back while holding an item in the right hand. |
Get Up Back LHGetUpBack_LH | AnimMontage ref | M_Neutral_GetUp_Back_Montage_LH | Get-up montage when lying on the back while holding an item in the left hand. |
Get Up Back 2HGetUpBack_2H | AnimMontage ref | M_Neutral_GetUp_Back_Montage_2H | Get-up montage when lying on the back while holding an item with both hands. |
Get Up Front DefaultGetUpFront_Default | AnimMontage ref | M_Neutral_GetUp_Front_Montage_Default | Get-up montage when lying face down with no item or an unlisted item. |
Get Up Front LHGetUpFront_LH | AnimMontage ref | M_Neutral_GetUp_Front_Montage_LH | Get-up montage when lying face down while holding an item in the left hand. |
Get Up Front 2HGetUpFront_2H | AnimMontage ref | M_Neutral_GetUp_Front_Montage_2H | Get-up montage when lying face down while holding an item with both hands. |
Get Up Front RHGetUpFront_RH | AnimMontage ref | M_Neutral_GetUp_Front_Montage_RH | Get-up montage when lying face down while holding an item in the right hand. |
Use Held Item Get UpsbUseHeldItemGetUps | Boolean | true | Holding an item: get up with the GetUpBack / GetUpFront montages for the item's hands (RH, LH, 2H). Otherwise, and with no item, the get-up comes from CHT_GetUpMontages (pose-matched, like the Mover pawn). Default on. |
Ragdoll > Motion¶
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll Rotation Interp SpeedRagdollRotationInterpSpeed | Float | 8 | How fast the capsule turns toward the ragdoll's facing (pelvis-to-spine, flipped when lying face up). 0 snaps: the facing then flips 180 degrees in one frame when the body rolls over. Default 8. |
Runtime state (2 variables)
| Variable | Type | Default | Description |
|---|---|---|---|
Ragdoll Replicated LocationRagdollReplicatedLocation | Vector | (0, 0, 0) | Server: the capsule position while ragdolling (it follows the server's pelvis). Other machines move their capsule toward it and pull their body toward the capsule, so every copy gets up where the server's body lies. Replicated. (replicated) |
Ragdoll Replicated RotationRagdollReplicatedRotation | Rotator | (0, 0, 0) | Server: the capsule rotation while ragdolling (see RagdollReplicatedLocation). Replicated. (replicated) |
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
ApplyRagdollImpulse | BoneName (Name), Impulse (Vector) | bHandled (Boolean) | Impulse on a ragdoll body (on every machine where the ragdoll replicates it). (BPI_RagdollSystem) |
InitializeSystem | ParentPawn (Pawn ref), ParentMesh (SkeletalMeshComponent ref), ParentCapsule (CapsuleComponent ref) | bInitialized (Boolean) | |
IsRagdollActive | bRagdolling (Boolean) | True while the character is ragdolling. (BPI_RagdollSystem) | |
IsRemoteCopy | bRemote (Boolean) | ||
RequestGetUp | bHandled (Boolean) | Ends the ragdoll and plays the get-up, only while ragdolling with the body resting on a floor. Returns false otherwise (a mid-air press does nothing). Called by the ragdoll input (X) and the jump input (Space). (BPI_RagdollSystem) | |
RequestRagdoll | bStopActiveMontages (Boolean), MontageBlendOut (MontageBlendSettings), InjuryState (Byte) | bHandled (Boolean) | Ragdoll the character (InjuryState: E_RagdollInjuryState as byte). Returns false when the ragdoll system is disabled. (BPI_RagdollSystem) |
UpdateRagdollFloor | bOnGround (Boolean) | ||
ApplyEntryMontageOptions | Stops the active montages when the ragdoll starts: with the montage options of a RequestRagdoll made on this machine, else with Default Ragdoll Montage Blend Out (other machines, or a ragdoll started from the X key). | ||
ApplyEntryPhysics | Ragdoll start: enables leg-to-leg collision and gives the bodies the pawn velocity x InheritedVelocityScale. Called right after the bodies start simulating, before the movement mode is cleared. | ||
ChooseCMCGetUp | Montage (AnimMontage ref), StartTime (Float) | Get-up montage and start time: the held-item variants (GetGetUpAnimation) when bUseHeldItemGetUps and an item is held in a hand, else the shared chooser (ChooseGetUpMontage). | |
GetGetUpAnimation (pure) | RagdollFaceUp (Boolean) | ReturnValue (AnimMontage ref) | Returns the held-item get-up montage: GetUpBack_* when RagdollFaceUp, else GetUpFront_*, picked by the hands holding the item (BPI_EquipmentSystem.GetHeldItemHands: both 2H, left LH, right RH, none or no equipment Default). Called by ChooseCMCGetUp. |
PlayGetUpMontage | Plays the get-up montage from ChooseCMCGetUp on the mesh. | ||
CacheCollisionState | Stores the capsule collision state and the mesh object type and collision state before the ragdoll changes them; Stop Ragdoll restores these values instead of fixed ones. | ||
CacheMeshTransform | Stores the mesh's relative location and rotation before the ragdoll moves it (called by ActivateRagdoll after CacheCollisionState). | ||
RestoreMeshTransform | Puts the mesh back at its cached relative location and rotation (teleport) once physics is off, so the get-up and everything after it play upright on the capsule. | ||
FindCharacterMovement | Finds the owner's CharacterMovementComponent (CharacterMovement). | ||
FollowRagdollWithCapsule | Every frame while ragdolling. Server: moves the capsule onto the body (SetActorLocationDuringRagdoll) and replicates its location and rotation. Other machines: ease the capsule toward the replicated location and rotation. | ||
SetActorLocationAndRotation(UpdateTarget) | NewLocation (Vector), NewRotation (Rotator), bSweep (Boolean), bTeleport (Boolean) | SweepHitResult (HitResult), ReturnValue (Boolean) | Moves the owning pawn to the location and turns it toward the rotation at RagdollRotationInterpSpeed, storing the rotation as RagdollTargetRotation. |
SetActorLocationDuringRagdoll | Moves the capsule onto the pelvis body's center of mass (from physics), facing the pelvis-to-spine direction, resting it on the ground when one is found below, and updates the face-up and on-ground flags. | ||
UpdateRagdoll | Last ragdoll update when the ragdoll ends (DeactivateRagdoll): stores the pelvis velocity in LastRagdollVelocity and moves the capsule to the body (FollowRagdollWithCapsule). While ragdolling, the capsule follows the body every tick through the UpdateRagdollFloor override. |
Events¶
OnRagdollStarted(event dispatcher): Dispatcher called when StartRagdoll runs.OnRagdollEnded(event dispatcher): Dispatcher called when StopRagdoll runs.StartRagdoll: custom event.StopRagdoll: custom event.DeactivateRagdoll: custom event.ActivateRagdoll: custom event.Multicast_StartRagdoll: Multicast RPC, reliable.Server_StopRagdoll: Server RPC, reliable.Server_StartRagdoll: Server RPC, reliable.Multicast_StopRagdoll: Multicast RPC, reliable.
BPI_RagdollSystem¶
/GASPALS/Systems/RagdollSystem/BPI_RagdollSystem · parent Interface
Implemented by the ragdoll adapters; find it with Get Ragdoll System (shared library).
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
ApplyRagdollImpulse | BoneName (Name), Impulse (Vector) | bHandled (Boolean) | Impulse on a ragdoll body (on every machine where the ragdoll replicates it). |
RequestGetUp | bHandled (Boolean) | Ends the ragdoll and plays the get-up, only while ragdolling with the body resting on a floor. Returns false otherwise (a mid-air press does nothing). Called by the ragdoll input (X) and the jump input (Space). | |
RequestRagdoll | bStopActiveMontages (Boolean), MontageBlendOut (MontageBlendSettings), InjuryState (Byte) | bHandled (Boolean) | Ragdoll the character (InjuryState: E_RagdollInjuryState as byte). Returns false when the ragdoll system is disabled. |
IsRagdollActive | bRagdolling (Boolean) | True while the character is ragdolling. |
BPI_RagdollSystemListener¶
/GASPALS/Systems/RagdollSystem/BPI_RagdollSystemListener · parent Interface
Implemented by components (the camera) and controllers (the NPC AI controller) that react to the ragdoll starting or ending.
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
OnRagdollStateChanged | bRagdolling (Boolean) | bHandled (Boolean) | Called by the ragdoll system when the ragdoll starts or ends, on the owner components that implement it and on the owner's controller when it implements it. |
BP_MovementMode_Ragdoll¶
/GASPALS/Blueprints/MovementModes/BP_MovementMode_Ragdoll · parent BaseMovementMode
Functions¶
| Function | Inputs | Outputs | Description |
|---|---|---|---|
SimulationTick | Params (SimulationTickParams), OutputState (MoverTickEndData) | Ragdoll sim tick: read the inputs, place the capsule on the ragdoll target transform (floor sphere trace), move it there with TrySafeMoveAndSlide, derive velocity and angular velocity, and write the new sync state. | |
GetCapsuleSize (pure) | HalfHeight (Float), Radius (Float) | Scaled half height and radius of the pawn's capsule (the CapsuleComponent of the Mover component's owner). SimulationTick uses them for the ground snap trace instead of fixed values (88 / 86 / 30), so the ragdoll capsule follows pawns with other capsule sizes. |