Hi,
I noticed that when streaming into and out of a sub-level that plays level-specific CameraAnims using the parent (persistent) level’s APlayerCameraManager, the CameraAnims were not cleared after the sub-level was unloaded.
I tracked it to APlayerCameraManager::ReleaseCameraAnimInst, which remembers a released UCameraAnimInst in its FreeAnims array.
To fix this, I added a method UCameraAnimInst::ClearAnim, with this code:
// Make sure this is stopped, if hasn't finished.
if (!bFinished)
{
Stop();
}
CamAnim = nullptr;
InterpGroupInst->Group = nullptr;
InterpGroupInst->GroupActor = nullptr;
and called Inst->ClearAnim from APlayerCameraManager::ReleaseCameraAnimInst.
The Stop call isn’t really necessary in this case, but I added it for safety’s sake. The GroupActor = null line isn’t really needed either, as it’s set to null anyway when the actor goes away - again, I added it for clarity’s sake.
Does that sound like the proper way to fix this?
Thanks,
Manu.