Description provided below
Steps to Reproduce
Hello,
I have encountered some strange behavior and a crash while testing out the GameplayCamerasPlayerCameraManager. What I was trying to do was have a gameplay camera actor placed in a level, and when the player presses a button, blend from third person camera to the static level camera (and back when he presses the button again) like this:
[Image Removed]
Both the level camera and players third person camera have linear blends associated with them.
It works fine, until I use “preview update” mode on the camera manager to update the control rotation on my character
[Image Removed]
Then when I try to come back to the players camera the editor crashes with the callstack provided below.
[Inline Frame] UnrealEditor-GameplayCameras.dll!UE::Cameras::FCameraNodeEvaluator::Serialize(const UE::Cameras::FCameraNodeEvaluatorSerializeParams &) Line 224 C++
[Inline Frame] UnrealEditor-GameplayCameras.dll!UE::Cameras::FCameraNodeEvaluatorHierarchy::CallSerialize::__l2::<lambda_1>::operator()(UE::Cameras::FCameraNodeEvaluator *) Line 109 C++
[Inline Frame] UnrealEditor-GameplayCameras.dll!UE::Cameras::FCameraNodeEvaluatorHierarchy::ForEachEvaluator(UE::Cameras::ECameraNodeEvaluatorFlags) Line 79 C++
[Inline Frame] UnrealEditor-GameplayCameras.dll!UE::Cameras::FCameraNodeEvaluatorHierarchy::CallSerialize(const UE::Cameras::FCameraNodeEvaluatorSerializeParams &) Line 106 C++
UnrealEditor-GameplayCameras.dll!UE::Cameras::FCameraSystemEvaluator::ViewRotationPreviewUpdate(const UE::Cameras::FCameraSystemEvaluationParams & Params, UE::Cameras::FCameraSystemViewRotationEvaluationResult & OutResult) Line 475 C++
[Inline Frame] UnrealEditor-GameplayCameras.dll!AGameplayCamerasPlayerCameraManager::RunViewRotationPreviewUpdate(float) Line 305 C++
UnrealEditor-GameplayCameras.dll!AGameplayCamerasPlayerCameraManager::ProcessViewRotation(float DeltaTime, UE::Math::TRotator<double> & OutViewRotation, UE::Math::TRotator<double> & OutDeltaRot) Line 285 C++
UnrealEditor-Engine.dll!APlayerController::UpdateRotation(float DeltaTime) Line 1008 C++
UnrealEditor-Engine.dll!APlayerController::PlayerTick(float DeltaTime) Line 2321 C++
UnrealEditor-Engine.dll!APlayerController::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction & ThisTickFunction) Line 5503 C++
UnrealEditor-Engine.dll!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 372 C++
[Inline Frame] UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> &) Line 329 C++
UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() Line 706 C++
UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 527 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 505 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilIdle(int QueueIndex) Line 679 C++
[Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilIdle(ENamedThreads::Type CurrentThread) Line 1419 C++
UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessUntilTasksComplete(const TArray<TRefCountPtr<FBaseGraphTask>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown, const TFunction<enum FTaskGraphInterface::EProcessTasksOperation __cdecl(int)> & IdleWorkUpdate) Line 1592 C++
UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete, TArray<FTickFunction *,TSizedDefaultAllocator<32>> & TicksToManualDispatch) Line 986 C++
UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 2079 C++
UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 786 C++
UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1511 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2150 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 533 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5625 C++
When I do not deactivate the level camera, but rather activate players camera again, then the crash doesnt happen, so maybe I am not supposed to deactivate the camera at all?
[Image Removed]
Additionally, when I use the “Preview update” option, all blends are played two times faster then they should (I have some blend set to be 4s long, but it takes only 2s). My guess is that when the camera system hierarchy is serialized back after the “ViewRotationPreview” update, the CurrentTime of the blends isnt serialized and the blend is effectively run two times each frame:
[Image Removed]
[Image Removed]
Could you please suggest how to approach these issues? I could override the OnSerialize function on FSimpleFixedTimeBlendCameraNodeEvaluator to serialize the CurrentTime as well. Are there going to be some other modes for the player control rotation?
Thank you in advance, best regards
Tom
Hello! Sorry, we were out on the usual Epic Summer Break the entire first half of July.
Thanks for checking out the GameplayCameras plugin! My apologies, the custom PlayerCameraManager hasn’t been tested much so far (hence why this is all still in “alpha”). I’ve reproduced the crash and will figure out what’s wrong. You’re also correct that the fixed-time blend nodes are missing serialization of their current time. That’s fixed locally but of course the fix will only ship in 5.7 at this point.