Quick answer: Set the Niagara System’s SkeletalMesh data interface Source to the live SkeletalMeshComponent (not the asset). From C++/BP set the User Parameter at runtime. Enable Always Sample if you need fresh values every emitter tick.
Niagara spawns blood from a hit bone. The position is from where the bone was a frame ago, looking detached from the actual hit. The data interface is sampling stale skeletal data.
The Symptom
Bone-driven particle spawn or attachment lags behind the actual bone position. Worse with fast animation. Editor preview may look fine; gameplay lags.
The Fix
Step 1: Define a User Parameter. Open the Niagara System. Add a User Parameter of type SkeletalMesh Component (or Actor) named e.g. User.MeshSource.
Step 2: Set Source on the data interface. In the emitter where you sample bones, the SkeletalMesh data interface has a Source dropdown. Pick the User Parameter.
Step 3: Bind from C++ at spawn time.
UNiagaraComponent* Vfx = UNiagaraFunctionLibrary::SpawnSystemAttached(
System, Mesh, NAME_None, FVector::ZeroVector, FRotator::ZeroRotator,
EAttachLocation::SnapToTarget, true);
UNiagaraDataInterfaceFunctions::SetSkeletalMeshComponent(Vfx,
TEXT("User.MeshSource"), Mesh);
Or in Blueprint via Set Niagara Variable (Skeletal Mesh Component) with the User parameter name.
Step 4: Always Sample. On the data interface settings, enable Always Sample if your effect’s emitter rate is much lower than the mesh update rate.
Verifying
Sample bone position into Particles.Position in Initialize. Spawn point should match the bone’s current world position (within one frame). Use fx.Niagara.Debug.DrawSampledPositions 1 for debug visualization.
“Bind the live component. User Parameter route. Always Sample if needed. Bones track.”
Related Issues
For Niagara mesh attribute, see Niagara mesh attr. For Niagara CPU/GPU readback, see CPU/GPU readback.
Live source. User Parameter. Always Sample. Bones fresh.