Description

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.

Steps to Reproduce
  • Create a project from ThirdPersonTemplate
  • Enable the Animation Insights plugin (to enable Tools > Rewind Debugger)
  • Add a Tick function to the Character class that VLOGs its capsule component shape:
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"));
}
  • In Unreal Editor:
    • Open Tools > Visual Logger
    • Open Tools > Rewind Debugger
  • Start playing in PIE. Start capturing both via Visual Logger and Rewind Debugger
  • Walk around with the character
  • Stop PIE and stop both recordings
  • Click a capsule logging event in Visual Logger, observe that the capsule is drawn on the floor and matches the character's capsule location
  • Scrub through the Rewind Debugger
  • Observe: The capsule is drawn in the floor with its center on the floor and bottom underground
  • Expected: The capsule is drawn above the floor with its bottom touching it
Callstack

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++
 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-229258 in the post.

0
Login to Vote

Fixed
ComponentUE - Anim
Affects Versions5.4
Target Fix5.6
Fix Commit37650731
CreatedOct 31, 2024
ResolvedOct 31, 2024
UpdatedNov 5, 2024
View Jira Issue