VRCharacterBase.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2. #pragma once
  3. #include "CoreMinimal.h"
  4. #include "GameFramework/Character.h"
  5. #include "Camera/CameraComponent.h"
  6. #include "Components/TimelineComponent.h"
  7. #include "VRCharacterBase.generated.h"
  8. UCLASS()
  9. class TETREESEDEMO_API AVRCharacterBase : public ACharacter
  10. {
  11. GENERATED_BODY()
  12. public:
  13. // Sets default values for this character's properties
  14. AVRCharacterBase(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
  15. protected:
  16. // Called when the game starts or when spawned
  17. virtual void BeginPlay() override;
  18. public:
  19. // Called every frame
  20. virtual void Tick(float DeltaTime) override;
  21. // Called to bind functionality to input
  22. virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  23. private:
  24. void MoveForward(float value);
  25. void MoveRight(float value);
  26. void Turn(float value);
  27. void LookUp(float value);
  28. void BeginWaitConnected();
  29. void Test();
  30. private:
  31. UPROPERTY(Category = Component, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
  32. TObjectPtr<UCameraComponent> FirstPersonCamera;
  33. FTimeline MyTimeline;
  34. UPROPERTY()
  35. UCurveFloat* MyCurveFloat;
  36. UFUNCTION()
  37. void OnTimelineUpdate(float value);
  38. UFUNCTION()
  39. void OnTimelineFinished();
  40. };