91 lines
5.0 KiB
C++
91 lines
5.0 KiB
C++
// Request Games © All rights reserved
|
|
|
|
// Source/TengriPlatformer/Camera/Core/TengriCameraConfig.h
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/DataAsset.h"
|
|
#include "TengriCameraConfig.generated.h"
|
|
|
|
UENUM(BlueprintType)
|
|
enum class ETengriCameraBehavior : uint8
|
|
{
|
|
FreeLook UMETA(DisplayName = "Free Look (3D)"),
|
|
SideScroller UMETA(DisplayName = "Side Scroller (2.5D with DeadZone)")
|
|
};
|
|
|
|
/**
|
|
* Camera configuration data asset.
|
|
* Defines camera behavior, positioning, smoothing, and dead zone parameters.
|
|
*/
|
|
UCLASS(BlueprintType)
|
|
class TENGRIPLATFORMER_API UTengriCameraConfig : public UDataAsset
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// BEHAVIOR
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Behavior")
|
|
ETengriCameraBehavior BehaviorType = ETengriCameraBehavior::FreeLook;
|
|
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// TRANSFORM
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
/** Fixed camera rotation (SideScroller mode only) */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Transform")
|
|
FRotator FixedRotation = FRotator(-15.0f, -90.0f, 0.0f);
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Transform")
|
|
float TargetArmLength = 1000.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Transform")
|
|
FVector SocketOffset = FVector(0.f, 0.f, 100.f);
|
|
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// SMOOTHING
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
/** Interpolation speed for config transitions (arm length, rotation) */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Smoothing")
|
|
float TransitionSpeed = 2.0f;
|
|
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// LAG
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
/** Enable camera lag for cinematic feel */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Lag")
|
|
bool bEnableLag = true;
|
|
|
|
/** Lag interpolation speed (lower = slower/cinematic, higher = tighter) */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Lag", meta = (EditCondition = "bEnableLag", ClampMin = "0.1", ClampMax = "100.0"))
|
|
float LagSpeed = 5.0f;
|
|
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// DEAD ZONE
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
/**
|
|
* Dead zone extents (cm) - camera only moves when player exits this box.
|
|
* X = Forward/Backward, Y = Depth (usually 0 in 2.5D), Z = Up/Down
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Dead Zone")
|
|
FVector DeadZoneExtent = FVector(200.0f, 0.0f, 150.0f);
|
|
|
|
/** Offset dead zone center relative to player (e.g. see more ahead than behind) */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Dead Zone")
|
|
FVector DeadZoneOffset = FVector(0.0f, 0.0f, 50.0f);
|
|
|
|
// ════════════════════════════════════════════════════════════════════
|
|
// DEBUG
|
|
// ════════════════════════════════════════════════════════════════════
|
|
|
|
/** Draw debug box showing dead zone boundaries */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Debug")
|
|
bool bDrawDebugBox = false;
|
|
}; |