diff --git a/RoomEscape/Source/RoomEscape/Grabber.cpp b/RoomEscape/Source/RoomEscape/Grabber.cpp index e2baba8..4f9a412 100644 --- a/RoomEscape/Source/RoomEscape/Grabber.cpp +++ b/RoomEscape/Source/RoomEscape/Grabber.cpp @@ -1,7 +1,10 @@ // Tyrel Souza 2018 #include "Grabber.h" +#include "Engine/World.h" +#include "GameFramework/Actor.h" +#define OUT // Sets default values for this component's properties UGrabber::UGrabber() @@ -27,6 +30,29 @@ void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorCompone { 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 + + }