Guest User

TestPawn Header

a guest
Apr 10th, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Pawn.h"
  7. #include "Camera/CameraActor.h"
  8. #include "Camera/CameraComponent.h"
  9. #include "GameFramework/SpringArmComponent.h"
  10. #include "Components/InputComponent.h"
  11. #include "TestPawn.generated.h"
  12.  
  13. UCLASS()
  14. class ATestPawn : public APawn {
  15. GENERATED_BODY()
  16.  
  17. public:
  18. // Sets default values for this pawn's properties
  19. ATestPawn();
  20.  
  21. //Input variables
  22. FVector2D MovementInput;
  23. FVector2D CameraInput;
  24. float ZoomFactor;
  25. bool bZoomingIn;
  26.  
  27. //Input functions
  28. void MoveForward(float AxisValue);
  29. void MoveRight(float AxisValue);
  30. void PitchCamera(float AxisValue);
  31. void YawCamera(float AxisValue);
  32. void ZoomIn();
  33. void ZoomOut();
  34.  
  35.  
  36. protected:
  37. // Called when the game starts or when spawned
  38. virtual void BeginPlay() override;
  39.  
  40. UPROPERTY(EditAnywhere)
  41. USpringArmComponent* OurCameraSpringArm;
  42. UCameraComponent* OurCamera;
  43. //UCameraComponent* OurCamera2;
  44.  
  45. public:
  46. // Called every frame
  47. virtual void Tick(float DeltaTime) override;
  48.  
  49. // Called to bind functionality to input
  50. virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  51. FVector ATestPawn::GetNewLocation(FVector current);
  52. };
Add Comment
Please, Sign In to add comment