And then in the projectile class, invoke IgnoreActorWhenMoving method.
if (GetInstigator())
m_CollisionCapsule->IgnoreActorWhenMoving(GetInstigator(), true);
But it doesn’t work at all. Could someone explain to me how does this FActorSpawnParameters work ? Is it passed to the spawned actor and can be used ? Or am i missing something ?
I don’t know if this helps, but if you want to set the collision handling when the object has been spawned (basically the green pin on the Spawn Actor from Class node), you need to set the handling method outside the GetWorld->SpawnActor() function separately.
So like :
AActor* SpawnedActor = GetWorld()->SpawnActor(<ClassReference>, <LocationOfSpawn>);
SpawnedActor->SpawnCollisionHandlingMethod = SpawnActorCollisionHandlingMethod::AlwaysSpawn; //This is basically the green "Collision Handling Override" pin
Since this is STILL the first-ranked Google search result for FActorSpawnParameters, I’ll update it for 2024. The new wiki page for it is here: Actor | Unreal Engine Community Wiki
and to save you a click, here is a syntax example of its usage: