Merged PR #30: 0.1.4 — facade module kit, textured materials, theatre trim Co-authored-by: Zwitschi <zwitschi82@gmail.com>
71 lines
2.2 KiB
C++
71 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "GigLineShotActor.generated.h"
|
|
|
|
/**
|
|
* Dev-only helper for the visual-review screenshot pipeline.
|
|
*
|
|
* Placed in the review map by Tools/ue_build_review_map.py. In -game mode it
|
|
* walks a fixed list of camera setups, sets the view target to a spawned
|
|
* CameraActor for each, requests a screenshot via FScreenshotRequest, and
|
|
* quits the game when all shots are written. Lives in test content only;
|
|
* the shipped game never references this map.
|
|
*/
|
|
UCLASS()
|
|
class GIGLINE_API AGigLineShotActor : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AGigLineShotActor();
|
|
|
|
virtual void BeginPlay() override;
|
|
virtual void Tick(float DeltaSeconds) override;
|
|
|
|
/** World-space locations for each shot camera. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TArray<FVector> ShotLocations;
|
|
|
|
/** Rotations for each shot camera (same index as ShotLocations). */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TArray<FRotator> ShotRotations;
|
|
|
|
/** File name fragment for each shot (same index as ShotLocations). */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TArray<FString> ShotNames;
|
|
|
|
/**
|
|
* Optional per-shot field of view (degrees), same index as ShotLocations.
|
|
* Zero or missing entries keep the engine default (90 deg). Elevation shots
|
|
* taken from across the street need a long lens: a level camera 45 m out with
|
|
* the default FOV leaves the building small in frame, and tilting it up to fill
|
|
* the frame is what breaks the verticals.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TArray<float> ShotFieldOfView;
|
|
|
|
/** Seconds to let the view target settle before the capture. Resolution comes from the runner's -ResX/-ResY. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
float SettleSeconds = 0.35f;
|
|
|
|
/** Quit the game after the last shot (disable to keep the game open). */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
bool bQuitWhenDone = true;
|
|
|
|
private:
|
|
void NextShot();
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<class APlayerController> PlayerController;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<class ACameraActor> CurrentCamera;
|
|
|
|
int32 CurrentShot = 0;
|
|
float SettleCountdown = 0.f;
|
|
bool bWaitingForSettle = false;
|
|
bool bWaitingForScreenshot = false;
|
|
};
|