2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "SpringArmComponentVisualizer.h"
|
2022-08-30 23:03:03 -04:00
|
|
|
|
|
|
|
|
#include "Components/ActorComponent.h"
|
|
|
|
|
#include "Components/SceneComponent.h"
|
|
|
|
|
#include "Engine/EngineTypes.h"
|
2014-11-12 04:58:53 -05:00
|
|
|
#include "GameFramework/SpringArmComponent.h"
|
2022-08-30 23:03:03 -04:00
|
|
|
#include "HAL/Platform.h"
|
|
|
|
|
#include "Math/Color.h"
|
|
|
|
|
#include "Math/Transform.h"
|
|
|
|
|
#include "SceneManagement.h"
|
|
|
|
|
#include "Templates/Casts.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
static const FColor ArmColor(255,0,0);
|
|
|
|
|
|
|
|
|
|
void FSpringArmComponentVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI)
|
|
|
|
|
{
|
|
|
|
|
if (const USpringArmComponent* SpringArm = Cast<const USpringArmComponent>(Component))
|
|
|
|
|
{
|
|
|
|
|
PDI->DrawLine( SpringArm->GetComponentLocation(), SpringArm->GetSocketTransform(TEXT("SpringEndpoint"),RTS_World).GetTranslation(), ArmColor, SDPG_World );
|
|
|
|
|
}
|
|
|
|
|
}
|