Spawn Sword Trail Using Weapon Socket Not Player Sockets

Hi, I’m trying to spawn a sword trail using the default trail animation notify state that is prebuilt into Unreal Engine 5. However the default trail notify state only allows me to input the sockets from my player character’s skeletal mesh. How can I spawn a trail using an animation notify state, but using the sockets I made inside the static/skeletal mesh from my weapon?

Did you ever figured this out? or an alternative

While this is an old post, I’m responding in the hope that it might help someone.

In my case, I opened the code for AnimNotifyState_Trail and found that all I needed to do was change the MeshComp that it receives.

So, I created a C++ class inheriting from AnimNotifyState_Trail and in the NotifyBegin, NotifyTick, NotifyEnd sections, I passed the MeshComponent of the Actor that I wanted to receive.

An example is as follows.

ParticleSystemComponentArray Children;
AWeapon_Base* OwningWeapon = Cast<AWeapon_Base>(NotifyOwner->GetWeaponBase());
OwningWeapon->GetComponents(Children);

ActorMeshComp = OwningWeapon->GetMeshComponent();

The MeshComponent of my weapon actor is a StaticMeshComponent.

2 Likes