GetActorLocation returns 0,0,0 for AShooterExplosionEffect

Hi,
I have found small issue, because a RootComponent isn’t set in the AShooterExplosionEffect constructor
the GetActorLocation always returns FVector(0,0,0) in BeginPlay function. A particle emitter , sound and decal is always spawned somewhere :wink:

The fix is pretty simple:

AShooterExplosionEffect::AShooterExplosionEffect(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP)
{
...
RootComponent = ExplosionLight;
}

Best regards
Piotr Bąk

Hi,

We were actually looking at this issue, but from a different perspective. Thank you for the additional information you provided.

Hi ,

Can You describe this different perspective ?

Pierdek

Hi,

We had a known issue logged where opening the Blueprint for the explosion effect causes it to stop working. When I tested both that issue and the one you described, I noticed that they seem to actually be the same issue. The explosion effect was working fine initially, but when I opened the Blueprint and tried again, the explosion was still happening, but at location 0, 0, 0. If you don’t have that location visible on your screen, then it would look like it was not happening at all.

The line of code that you provided seemed to prevent the unexpected behavior. We are investigating why opening the Blueprint in the Editor causes the behavior.