Cascade Emitter Flickering

I have tracked the issue down to this engine change:

`void UParticleSystemComponent::ApplyWorldOffset(const FVector& InOffset, bool bWorldShift)
{
Super::ApplyWorldOffset(InOffset, bWorldShift);

// Trigger a reset as the offset applying below does not work correctly with all emitter types
// Niagara also resets so having Cascade follow the same path makes it consistent also
bResetTriggered = true;

#if 0
OldPosition += InOffset;

for (auto It = EmitterInstances.CreateIterator(); It; ++It)
{
FParticleEmitterInstance* EmitterInstance = *It;
if (EmitterInstance != NULL)
{
EmitterInstance->ApplyWorldOffset(InOffset, bWorldShift);
}
}
#endif
}`For now, we have reverted to the code that was in the engine we are upgrading from (4.27)--which incidentally is the code that is zeroed out in 5.6:

`void UParticleSystemComponent::ApplyWorldOffset(const FVector& InOffset, bool bWorldShift)
{
Super::ApplyWorldOffset(InOffset, bWorldShift);

OldPosition+= InOffset;

for (auto It = EmitterInstances.CreateIterator(); It; ++It)
{
FParticleEmitterInstance* EmitterInstance = *It;
if (EmitterInstance != NULL)
{
EmitterInstance->ApplyWorldOffset(InOffset, bWorldShift);
}
}
}`That fixes our flickering, but I am not sure if there will be side effects.

Do you have any thoughts?

Steps to Reproduce

We are upgrading one of our projects to version 5.6. Our old Cascade emitters, which are attached to skeletal meshes, are flickering.

Hi,

Do you know the callstack where this call comes from at all?

When we introduced large world coordinates we updated the particle positions, etc, to doubles, but the GPU doesn’t handle doubles so we store a tile + offset for the component. When the component travels through enough tiles we need to handle it. Rather than resetting perhaps we can handle this better like we can now in Niagara, I’d like to know the callstack to make sure I’m not understanding where the call comes from correctly.

Thanks,

Stu