So i am using C++ to spawn my projectiles:
FActorSpawnParameters SpawnParameters;
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
AAEFCProjectile* Projectile = GetWorld()->SpawnActorDeferred<AAEFCProjectile>(ProjectileClass, MuzzleTransform, GetOwningActorFromActorInfo(),
Hero, ESpawnActorCollisionHandlingMethod::AlwaysSpawn);
Projectile->DamageEffectSpecHandle = DamageEffectSpecHandle;
Projectile->Range = Range;
Projectile->FinishSpawning(MuzzleTransform);
The spawned gameobject has the following blueprint:
Now as you can see i do destroy the actors either by range or after some time (spawning a niagara effect and then destorying it)
However the number of actors loaded just continues to go up and after some time the games framerate goes downs so much that the simple map is unplayable.
I am a newbie to unreal engine but i wish to learn could anyone help me out?