Eject Casing (AN_TFA_EjectCasing)
Emits a casing at the ejection frame.
Asset path: /Game/InfimaGames/TacticalFPSAnimations/Common/Core/Animation/AN_TFA_EjectCasing
AN_TFA_EjectCasing is the notify used when a casing should eject during firing, inspection, or weapon-clearing animations. Like AN_TFA_DropMagazine, this is a weapon-owned notify, so it only works when the active animation is playing on a mesh owned by BP_TFA_BaseWeapon.
Quick Navigation
Purpose
Use this notify when you want a casing to eject at a specific animation frame.
Owner Requirement
This notify only works when the active animation is playing on a mesh owned by BP_TFA_BaseWeapon.
Notify Blueprint Flow
This notify is implemented in Received_Notify. It gets the owner from MeshComp, casts that owner to BP_TFA_BaseWeapon, builds a randomized RotationOffset from the configured min and max rotators, and then calls Weapon.EjectCasing(RotationOffset, MinEjectForce, MaxEjectForce, RotationSpeed). If the cast fails, nothing happens.
This notify does not spawn the casing directly. It delegates the actual work to BP_TFA_BaseWeapon::EjectCasing.
Readable Blueprint Flow
Parameters
Force Tuning
MinEjectForceMaxEjectForce
These define the random ejection-force range used by the weapon.
Rotation Tuning
RotationSpeed
This value is passed into EjectCasing as the spin amount.
Rotation Offset Randomization
MinEjectRotationOffsetMaxEjectRotationOffset
On notify fire, the Blueprint breaks both rotators into roll, pitch, and yaw, randomizes each axis with RandomFloatInRange, then rebuilds the final RotationOffset with MakeRotator.
Keep each min axis less than or equal to its matching max axis. Reversed values still run, but they make the intended range much harder to reason about.
This per-notify randomization is great for adding subtle variation so every casing does not eject on the exact same path.
Default Values
MinEjectForce = 50.0MaxEjectForce = 65.0RotationSpeed = 0.0MinEjectRotationOffset = (Pitch=0, Yaw=0, Roll=0)MaxEjectRotationOffset = (Pitch=0, Yaw=0, Roll=0)
With the default setup, the casing uses a random ejection force between 50 and 65, and it gets no extra rotation offset until you change the min and max rotators.
What EjectCasing Does
EjectCasing DoesBP_TFA_BaseWeapon::EjectCasing handles the actual spawn and physics work.
Implementation summary:
Spawns
BP_TFA_PhysicsCasingatCurrentConfig.SocketCasingEjectonSK_ReceiverAssigns
ImpactSound = CurrentConfig.SoundCue_WEP_CasingEjectwhen supportedSets the mesh to
CurrentConfig.MeshBulletCasingApplies impulse using the forward vector of
CombineRotators(SocketRotation, RotationOffset)Chooses force from the range
[MinEjectForce, MaxEjectForce]Applies linear impulse with
bVelChange = falseApplies angular impulse with a random axis scaled by
RotationSpeedandbVelChange = true
See Base Weapon (BP_TFA_BaseWeapon) for the fuller weapon-side breakdown.
Placement Tips
Place the notify on the frame where the bolt or eject motion looks correct
Put it on the montage that plays on the weapon mesh
Keep the rotation offsets relatively small, because large offsets usually make the casing look like it teleported sideways
Troubleshooting
Nothing happens
The animation is playing on a mesh that is not owned by
BP_TFA_BaseWeaponBP_TFA_BaseWeapon::EjectCasingexits early for your setup
Related Pages
Last updated
Was this helpful?

