C++ UParticleSystemComponent - OnParticleCollide Signature

^ Above is the horrendous documentation we have. So i’ve delved into the source to find out it wants:

^ These Parameters

Here is the code i have, that claims the signature is wrong
UParticleSystemComponent* PSC = UGameplayStatics::SpawnEmitterAtLocation(World, BileSprayPS, Location, Rotation);
if (PSC != nullptr)
PSC->OnParticleCollide.AddDynamic(this, &UBossAttacksComponent::InflictDamage);

void InflictDamage(const FName& EventName, float EmitterTime, int ParticleTime, const FVector& Location, const FVector& Velocity, const FVector& Direction, const FVector& Normal, const FName& BoneName);

Can anyone identify the problem here, or … yea, anything xD



Better not rely on comments, it’s easy to miss fixing them when changing code.

DECLARE_DYNAMIC_MULTICAST_DELEGATE_NineParams( FParticleCollisionSignature, FName, EventName, float, EmitterTime, int32, ParticleTime, FVector, Location, FVector, Velocity, FVector, Direction, FVector, Normal, FName, BoneName, UPhysicalMaterial*, PhysMat);

In this case, you are missing the last parameter.

UPhysicalMaterial* PhysMat

This was helpful. Thanks.