VRGroupBase.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2. #include "VRGroupBase.h"
  3. // Sets default values
  4. AVRGroupBase::AVRGroupBase(const FObjectInitializer& ObjectInitializer)
  5. {
  6. // Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
  7. PrimaryActorTick.bCanEverTick = true;
  8. ProceduralMesh = CreateDefaultSubobject<UProceduralMeshComponent>(FName(TEXT("ProceduralMesh")));
  9. RootComponent = ProceduralMesh;
  10. ThirdPersonCamera = CreateDefaultSubobject<UCameraComponent>(FName(TEXT("ThirdPersonCamera")));
  11. ThirdPersonCamera->SetupAttachment(ProceduralMesh);
  12. FloatingPawnMovement = CreateDefaultSubobject<UFloatingPawnMovement>(FName(TEXT("FloatingPawnMovement")));
  13. FloatingPawnMovement->UpdatedComponent = ProceduralMesh;
  14. }
  15. // Called when the game starts or when spawned
  16. void AVRGroupBase::BeginPlay()
  17. {
  18. Super::BeginPlay();
  19. }
  20. // Called every frame
  21. void AVRGroupBase::Tick(float DeltaTime)
  22. {
  23. Super::Tick(DeltaTime);
  24. }
  25. // Called to bind functionality to input
  26. void AVRGroupBase::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
  27. {
  28. Super::SetupPlayerInputComponent(PlayerInputComponent);
  29. }