Skip to content
Snippets Groups Projects
Select Git revision
  • 0a5e566b83ec543832d310cb6781ac3bec12cf17
  • 5.4 default protected
  • 5.5
  • dev/5.5
  • dev/5.4
  • dev/5.3_downgrade
  • feature/experimenttime_hack
  • 5.3 protected
  • _IntenSelect5.3
  • IntenSelect5.3
  • 4.27 protected
  • 4.26 protected
  • 5.0 protected
  • 4.22 protected
  • 4.21 protected
  • UE5.4-2024.1
  • UE5.4-2024.1-rc1
  • UE5.3-2023.1-rc3
  • UE5.3-2023.1-rc2
  • UE5.3-2023.1-rc
20 results

Entrance_Pillars.uasset

Blame
  • PointOfInterestManager.h 2.55 KiB
    #pragma once
    
    #include "CoreMinimal.h"
    #include "Components/SplineComponent.h"
    
    #include "PointOfInterestManager.generated.h"
    
    DECLARE_LOG_CATEGORY_EXTERN(POIManagerLog, All, All);
    
    class APointOfInterest;
    class FCameraRide;
    
    UCLASS(Blueprintable)
    class APointOfInterestManager : public AActor
    {
    	GENERATED_BODY()
    
    public:
    	APointOfInterestManager();
    
    	virtual void TickActor(float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction) override;
    
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void AddPointOfInterest();
    
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void VisitNextPointOfInterest();
    
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void VisitPreviousPointOfInterest();
    
    	UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
    	void VisitPointOfInterestByIndex(int index);
    	UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
    	void VisitPointOfInterest(APointOfInterest* POI) const;
    
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void StartCameraRide();
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void StopCameraRide();
    
    	UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
    	int GetPointOfInterestCount();
    
    	/**
    	 * Whether the camera should progress a constant distance between ticks (true) or a variable distance based on frametimes (false).
    	 * This should be set to true if you expect long/inconsistent frame times or for e.g. PSO gathering.
    	 */
    	UPROPERTY(EditAnywhere, Category="Point Of Interest Manager")
    	bool MakeCameraRideProgressionConstantBetweenTicks = true;
    
    	/**
    	 * Only relevant when MakeCameraRideProgressionConstantBetweenTicks = true.
    	 * The conversion rate of how many ticks the camera should update to equal the distance traveled during 1 second.
    	 */
    	UPROPERTY(EditAnywhere, Category="Point Of Interest Manager",
    		meta = (EditCondition = "MakeCameraRideProgressionConstantBetweenTicks"))
    	int CameraRideSecondsToUpdates = 60;
    
    protected:
    	UPROPERTY(EditAnywhere)
    	TArray<APointOfInterest*> POIs;
    
    	int CurrentPOIIndex = 0;
    
    private:
    	UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
    	void UpdateSpline();
    
    	void ProgressCameraRide();
    	void CameraRideEnded();
    
    	USplineComponent* SplineComponent;
    
    	UPROPERTY(EditAnywhere, meta=(UIMin = 0.0, UIMax = 500))
    	float CameraSpeed = 100;
    	bool IsRidingCamera;
    	float CameraRideStart, CameraRideEnd;
    	int DurationInUpdates, CurrentUpdate;
    };