Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Pawn.h"
- #include "Camera/CameraActor.h"
- #include "Camera/CameraComponent.h"
- #include "GameFramework/SpringArmComponent.h"
- #include "Components/InputComponent.h"
- #include "TestPawn.generated.h"
- UCLASS()
- class ATestPawn : public APawn {
- GENERATED_BODY()
- public:
- // Sets default values for this pawn's properties
- ATestPawn();
- //Input variables
- FVector2D MovementInput;
- FVector2D CameraInput;
- float ZoomFactor;
- bool bZoomingIn;
- //Input functions
- void MoveForward(float AxisValue);
- void MoveRight(float AxisValue);
- void PitchCamera(float AxisValue);
- void YawCamera(float AxisValue);
- void ZoomIn();
- void ZoomOut();
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- UPROPERTY(EditAnywhere)
- USpringArmComponent* OurCameraSpringArm;
- UCameraComponent* OurCamera;
- //UCameraComponent* OurCamera2;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- // Called to bind functionality to input
- virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
- FVector ATestPawn::GetNewLocation(FVector current);
- };
Add Comment
Please, Sign In to add comment