Created
January 20, 2017 16:50
-
-
Save ityulkanov/9a30e8cb31727e3b2691d8231df9cabb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fill out your copyright notice in the Description page of Project Settings. | |
#pragma once | |
#include "Components/ActorComponent.h" | |
#include "Grabber.generated.h" | |
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) | |
class BUILDINGESCAPE_API UGrabber : public UActorComponent | |
{ | |
GENERATED_BODY() | |
public: | |
// Sets default values for this component's properties | |
UGrabber(); | |
// Called when the game starts | |
virtual void BeginPlay() override; | |
// Called every frame | |
virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override; | |
private: | |
float Reach = 100.f; // How far ahead should the player reach | |
void Grab(); | |
///CALLED WHEN GRAB IS REALEASED | |
void Release(); | |
UPhysicsHandleComponent * PhysicsHandle = nullptr; | |
UInputComponent * InputComponent = nullptr; | |
//raycast and grab whats in greach | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment