log view location and rotation
This commit is contained in:
parent
2f67151c4a
commit
96071d32fa
@ -1,7 +1,10 @@
|
|||||||
// Tyrel Souza 2018
|
// Tyrel Souza 2018
|
||||||
|
|
||||||
#include "Grabber.h"
|
#include "Grabber.h"
|
||||||
|
#include "Engine/World.h"
|
||||||
|
#include "GameFramework/Actor.h"
|
||||||
|
|
||||||
|
#define OUT
|
||||||
|
|
||||||
// Sets default values for this component's properties
|
// Sets default values for this component's properties
|
||||||
UGrabber::UGrabber()
|
UGrabber::UGrabber()
|
||||||
@ -27,6 +30,29 @@ void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorCompone
|
|||||||
{
|
{
|
||||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||||
|
|
||||||
|
// Get player View point in this tick
|
||||||
|
FVector PlayerViewpointLocation;
|
||||||
|
FRotator PlayerViewpointRotation;
|
||||||
|
GetWorld()->GetFirstPlayerController(
|
||||||
|
)->GetPlayerViewPoint(
|
||||||
|
OUT PlayerViewpointLocation,
|
||||||
|
OUT PlayerViewpointRotation
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
UE_LOG(LogTemp,
|
||||||
|
Warning,
|
||||||
|
TEXT("View Point at %s rotating %s"),
|
||||||
|
*PlayerViewpointLocation.ToString(),
|
||||||
|
*PlayerViewpointRotation.ToString()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Ray-Cast out to reach distance
|
||||||
|
|
||||||
|
// See what we hit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user