Context
UE_VLOG macros can be used to capture debug shapes into both a Visual Logger recording and a Rewind Debugger recording.
Problem
In the Rewind Debugger, the capsule shapes are drawn at an incorrect location. The Rewind Debugger's call to render the capsule passes the Base of the capsule as the Center argument when calling DrawDebugCapsule. It needs to pass in the correct Center so debug capsules are rendered at the right location by Rewind Debugger.
void AVisLogCapsule54RCharacter::Tick(float DeltaSeconds) { Super::Tick(DeltaSeconds); const FVector CenterOffset = FVector(0, 0, GetCapsuleComponent()->GetScaledCapsuleHalfHeight()); const FQuat Rotation = GetActorRotation().Quaternion(); UE_VLOG_CAPSULE(this, LogTemp, Display, GetActorLocation() - Rotation.RotateVector(CenterOffset), GetCapsuleComponent()->GetScaledCapsuleHalfHeight(), GetCapsuleComponent()->GetScaledCapsuleRadius(), Rotation, FColor::Green, TEXT("Capsule test")); }
Non-fatal, but this is where the capsule gets rendered:
> UnrealEditor-RewindDebuggerVLog.patch_4.exe!FVisualLogEntryRenderer::RenderLogEntry(UWorld * World, const FVisualLogEntry & Entry, TFunctionRef<bool __cdecl(FName const &,enum ELogVerbosity::Type)> MatchCategoryFilters, UCanvas * Canvas, UFont * Font, UFont * MonospaceFont, int & ScreenTextY) Line 325 C++ UnrealEditor-RewindDebuggerVLog.dll!FRewindDebuggerVLog::RenderLogEntry(const FVisualLogEntry & Entry, UCanvas * Canvas) Line 151 C++ [External Code] [Inline Frame] UnrealEditor-RewindDebuggerVLog.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::FFunctionRefStoragePolicy,enum TraceServices::EEventEnumerate __cdecl(double,double,unsigned int,FVisualLogEntry const &)>::operator()(double <Params_0>, double <Params_1>, unsigned int <Params_2>, const FVisualLogEntry &) Line 470 C++ UnrealEditor-RewindDebuggerVLog.dll!TraceServices::TPointTimeline<FVisualLogEntry,TraceServices::FPointTimelineDefaultSettings>::EnumerateEvents(double IntervalStart, double IntervalEnd, TFunctionRef<enum TraceServices::EEventEnumerate __cdecl(double,double,unsigned int,FVisualLogEntry const &)> Callback) Line 80 C++ UnrealEditor-RewindDebuggerVLog.dll!FRewindDebuggerVLog::AddLogEntries::__l9::<lambda_1>::operator()(const TraceServices::ITimeline<FVisualLogEntry> & TimelineData) Line 257 C++ [Inline Frame] UnrealEditor-RewindDebuggerVLog.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::FFunctionRefStoragePolicy,void __cdecl(TraceServices::ITimeline<FVisualLogEntry> const &)>::operator()(const TraceServices::ITimeline<FVisualLogEntry> &) Line 470 C++ UnrealEditor-RewindDebuggerVLog.dll!FVisualLoggerProvider::ReadVisualLogEntryTimeline(unsigned __int64 InObjectId, TFunctionRef<void __cdecl(TraceServices::ITimeline<FVisualLogEntry> const &)> Callback) Line 23 C++ UnrealEditor-RewindDebuggerVLog.dll!FRewindDebuggerVLog::AddLogEntries(const TArray<TSharedPtr<FDebugObjectInfo,1>,TSizedDefaultAllocator<32>> & Components, float StartTime, float EndTime, const IVisualLoggerProvider * VisualLoggerProvider, UCanvas * Canvas) Line 260 C++ UnrealEditor-RewindDebuggerVLog.dll!FRewindDebuggerVLog::AddLogEntries(const TArray<TSharedPtr<FDebugObjectInfo,1>,TSizedDefaultAllocator<32>> & Components, float StartTime, float EndTime, const IVisualLoggerProvider * VisualLoggerProvider, UCanvas * Canvas) Line 242 C++ UnrealEditor-RewindDebuggerVLog.dll!FRewindDebuggerVLog::OnShowDebugInfo(UCanvas * Canvas, APlayerController * Player) Line 63 C++ [External Code] [Inline Frame] UnrealEditor-Engine.dll!TMulticastDelegateBase<FDefaultDelegateUserPolicy>::Broadcast(UCanvas *) Line 258 C++ [Inline Frame] UnrealEditor-Engine.dll!TMulticastDelegate<void __cdecl(UCanvas *,APlayerController *),FDefaultDelegateUserPolicy>::Broadcast(UCanvas *) Line 1079 C++ UnrealEditor-Engine.dll!UDebugDrawService::Draw(const FEngineShowFlags Flags, UCanvas * Canvas) Line 93 C++ UnrealEditor-Engine.dll!UDebugDrawService::Draw(const FEngineShowFlags Flags, FViewport * Viewport, FSceneView * View, FCanvas * Canvas, UCanvas * CanvasObject) Line 76 C++ UnrealEditor-UnrealEd.dll!FEditorViewportClient::Draw(FViewport * InViewport, FCanvas * Canvas) Line 4452 C++ UnrealEditor-Engine.dll!FViewport::Draw(bool bShouldPresent) Line 1806 C++ UnrealEditor-UnrealEd.dll!UEditorEngine::UpdateSingleViewportClient(FEditorViewportClient * InViewportClient, const bool bInAllowNonRealtimeViewportToDraw, bool bLinkedOrthoMovement, bool * bOutViewportDrawn) Line 2664 C++ UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2317 C++ UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 546 C++ UnrealEditor.exe!FEngineLoop::Tick() Line 5872 C++
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-229258 in the post.