CogDebug: improving transform gizmos and collision tester (WIP)

This commit is contained in:
Arnaud Jamin
2023-12-29 03:08:15 -05:00
parent bd29211013
commit 81fc6269ad
34 changed files with 889 additions and 655 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ void UCogSampleAreaComponent::TickComponent(float DeltaTime, enum ELevelTick Tic
#if ENABLE_COG
const AActor* AreaInstigator = UCogSampleFunctionLibrary_Gameplay::GetInstigator(GetOwner());
if (FCogDebugLog::IsLogCategoryActive(LogCogArea) && FCogDebugSettings::IsDebugActiveForObject(AreaInstigator))
if (FCogDebugLog::IsLogCategoryActive(LogCogArea) && FCogDebug::IsDebugActiveForObject(AreaInstigator))
{
TArray<USceneComponent*, TInlineAllocator<8>> Components;
GetOwner()->GetComponents<USceneComponent>(Components);
+1 -1
View File
@@ -677,7 +677,7 @@ void ACogSampleCharacter::OnGhostTagNewOrRemoved(const FGameplayTag InTag, int32
void ACogSampleCharacter::OnScaleAttributeChanged(const FOnAttributeChangeData& Data)
{
//----------------------------------------------------------------------------------
// 'Data.NewValue' is not used because it seems to only corresponds to the changes
// 'Settings.NewValue' is not used because it seems to only corresponds to the changes
// of the BaseValue which do not account for the temporary modifiers.
//----------------------------------------------------------------------------------
@@ -224,7 +224,7 @@ void UCogSampleCharacterMovementComponent::TickComponent(float DeltaTime, enum E
const ACharacter* Character = GetCharacterOwner();
const UCapsuleComponent* CapsuleComponent = Character->GetCapsuleComponent();
if (FCogDebugSettings::IsDebugActiveForObject(GetPawnOwner()))
if (FCogDebug::IsDebugActiveForObject(GetPawnOwner()))
{
FCogDebugPlot::PlotValue(GetPawnOwner(), "Move Input X", GetPendingInputVector().X);
FCogDebugPlot::PlotValue(GetPawnOwner(), "Move Input Y", GetPendingInputVector().Y);
@@ -241,7 +241,7 @@ void UCogSampleCharacterMovementComponent::TickComponent(float DeltaTime, enum E
const FVector DebugLocation = Character->GetActorLocation();
const FVector DebugBottomLocation = DebugLocation - FVector::UpVector * CapsuleComponent->GetScaledCapsuleHalfHeight();
if (FCogDebugSettings::IsDebugActiveForObject(GetPawnOwner()))
if (FCogDebug::IsDebugActiveForObject(GetPawnOwner()))
{
const FRotator Rotation = Character->GetActorRotation();
const FVector Forward = Character->GetActorForwardVector();
+2 -2
View File
@@ -5,13 +5,13 @@
#if ENABLE_COG
#include "CogDebugSettings.h"
#include "CogDebug.h"
#define COG_LOG_ABILITY(Verbosity, Ability, Format, ...) \
if (Ability != nullptr) \
{ \
AActor* Actor = Ability->GetAvatarActorFromActorInfo(); \
if (FCogDebugSettings::IsDebugActiveForObject(Actor) || (int32)Verbosity <= (int32)ELogVerbosity::Warning) \
if (FCogDebug::IsDebugActiveForObject(Actor) || (int32)Verbosity <= (int32)ELogVerbosity::Warning) \
{ \
COG_LOG(LogCogAbility, Verbosity, TEXT("%s - %s - %s - %s"), \
*GetNameSafe(Actor), \
@@ -197,7 +197,7 @@ bool UCogSampleGameplayAbility::IsCostGameplayEffectIsZero(const UGameplayEffect
const float CostValue = ModSpec.GetEvaluatedMagnitude();
//----------------------------------------------------------------------------------------------
// The Cost in the Data is positive, but UCogSampleModifierCalculation_Cost negates it.
// The Cost in the Settings is positive, but UCogSampleModifierCalculation_Cost negates it.
// Therefore a cost less than zero is an actual cost, and a cost of 0 or greater can be ignored
//----------------------------------------------------------------------------------------------
if (CostValue < 0)