debug line for grab range
This commit is contained in:
parent
96071d32fa
commit
73dc2c820d
Binary file not shown.
Binary file not shown.
@ -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
|
||||
|
||||
|
@ -24,6 +24,8 @@ public:
|
||||
// Called every frame
|
||||
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
|
||||
|
||||
private:
|
||||
float Reach = 100.f;
|
||||
|
||||
|
||||
};
|
||||
|
@ -40,4 +40,5 @@ private:
|
||||
AActor* ActorThatOpens;
|
||||
AActor* OwningDoor;
|
||||
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user