debug line for grab range

This commit is contained in:
Tyrel Souza 2018-02-19 22:47:22 -05:00
parent 96071d32fa
commit 73dc2c820d
5 changed files with 28 additions and 6 deletions

Binary file not shown.

View File

@ -3,6 +3,7 @@
#include "Grabber.h"
#include "Engine/World.h"
#include "GameFramework/Actor.h"
#include "Public/DrawDebugHelpers.h"
#define OUT
@ -39,14 +40,32 @@ void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorCompone
OUT PlayerViewpointRotation
);
FVector LineTraceEnd = PlayerViewpointLocation + PlayerViewpointRotation.Vector() * Reach;
UE_LOG(LogTemp,
Warning,
TEXT("View Point at %s rotating %s"),
*PlayerViewpointLocation.ToString(),
*PlayerViewpointRotation.ToString()
DrawDebugLine(
GetWorld(),
PlayerViewpointLocation,
LineTraceEnd,
FColor(255, 0, 0),
false,
0.f,
0,
5.0f
);
//UE_LOG(LogTemp,
// Warning,
// TEXT("Location: %s Rotation: %s"),
// *PlayerViewpointLocation.ToString(),
// *PlayerViewpointRotation.ToString()
//);
//UE_LOG(LogTemp,
// Warning,
// TEXT("LineTraceEnd: %s"),
// *LineTraceEnd.ToString()
//);
// Ray-Cast out to reach distance

View File

@ -24,6 +24,8 @@ public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
private:
float Reach = 100.f;
};

View File

@ -40,4 +40,5 @@ private:
AActor* ActorThatOpens;
AActor* OwningDoor;
};