Space Plunder
Loading...
Searching...
No Matches
ALSDebugComponent.cpp File Reference
#include "Components/ALSDebugComponent.h"
#include "CollisionShape.h"
#include "Character/ALSBaseCharacter.h"
#include "Character/ALSPlayerCameraManager.h"
#include "Character/Animation/ALSPlayerCameraBehavior.h"
#include "Kismet/GameplayStatics.h"
#include "DrawDebugHelpers.h"

Functions

 DECLARE_CYCLE_STAT (TEXT("ALS Debug Component (All Functions)"), STATGROUP_ALS_Debug_Component, STATGROUP_ALS)
 
 DECLARE_CYCLE_STAT (TEXT("ALS Debug Component Tick"), STATGROUP_ALS_Debug_Component_Tick, STATGROUP_ALS)
 
static void DrawDebugSweptSphere (const UWorld *InWorld, FVector const &Start, FVector const &End, float Radius, FColor const &Color, bool bPersistentLines=false, float LifeTime=-1.f, uint8 DepthPriority=0)
 

Function Documentation

◆ DECLARE_CYCLE_STAT() [1/2]

DECLARE_CYCLE_STAT ( TEXT("ALS Debug Component (All Functions)") ,
STATGROUP_ALS_Debug_Component ,
STATGROUP_ALS  )

◆ DECLARE_CYCLE_STAT() [2/2]

DECLARE_CYCLE_STAT ( TEXT("ALS Debug Component Tick") ,
STATGROUP_ALS_Debug_Component_Tick ,
STATGROUP_ALS  )

◆ DrawDebugSweptSphere()

static void DrawDebugSweptSphere ( const UWorld * InWorld,
FVector const & Start,
FVector const & End,
float Radius,
FColor const & Color,
bool bPersistentLines = false,
float LifeTime = -1.f,
uint8 DepthPriority = 0 )
static
323{
324 TRACE_CPUPROFILER_EVENT_SCOPE(UALSDebugComponent::DrawDebugSweptSphere);
325 SCOPE_CYCLE_COUNTER(STATGROUP_ALS_Debug_Component);
326
327 FVector const TraceVec = End - Start;
328 float const Dist = TraceVec.Size();
329
330 FVector const Center = Start + TraceVec * 0.5f;
331 float const HalfHeight = (Dist * 0.5f) + Radius;
332
333 FQuat const CapsuleRot = FRotationMatrix::MakeFromZ(TraceVec).ToQuat();
334 DrawDebugCapsule(InWorld, Center, HalfHeight, Radius, CapsuleRot, Color, bPersistentLines, LifeTime, DepthPriority);
335}