In my game when characters get struck they drop items. I want those items to sort of fly out of the character. So I have tried to do this with a radial impulse using the following code:
APickup* const SpawnedItem = World->SpawnActor<APickup>(SpillableItem, SpawnLocation, SpawnRotation, SpawnParams);
SpawnedItem->MovementComponent->AddRadialImpulse(GetActorLocation(), 200.f, 50.f, ERadialImpulseFalloff::RIF_Constant, false);
I have tried applying the impulse to the base collision component and also (as above) adding a dedicated sphere component, but in all cases the spawned items just fall straight down on to the ground with no force applied. Any ideas what I might be doing wrong?