Add focused word scale-down and smooth camera shake + unfocus words scribble

This commit is contained in:
2026-01-27 20:13:18 +01:00
parent d1b7104676
commit b64a57d810
16 changed files with 764 additions and 32 deletions
@@ -13,6 +13,9 @@ namespace Unheimlich.Data.Dialogues
[Tooltip("How choices appear in the world")]
public ChoiceSpawnMode SpawnMode = ChoiceSpawnMode.AroundAnchor;
[Tooltip("Default scale multiplier for spawned choices (1.0 = normal size)")]
public float DefaultScaleMultiplier = 1.0f;
[Header("Spawn Settings")]
[Tooltip("Radius around anchor where choices spawn")]
public float SpawnRadius = 2f;
@@ -53,6 +56,10 @@ namespace Unheimlich.Data.Dialogues
[Tooltip("Smoothness of shake transitions (higher = smoother)")]
public float ShakeSmoothness = 2f;
[Tooltip("Shake speed multiplier for unfocused choices when one is focused (0.3 = 30% speed)")]
[Range(0f, 1f)]
public float UnfocusedShakeSpeedMultiplier = 0.3f;
[Header("Ghost Trail Effect")]
[Tooltip("Enable ghost/shadow trail effect behind text (Heavy Rain style)")]
public bool EnableGhostTrail = false;
@@ -105,6 +112,46 @@ namespace Unheimlich.Data.Dialogues
[Tooltip("Rotation speed when a choice is focused (degrees per second). Higher = faster rotation.")]
public float FocusRotationSpeed = 60f;
[Tooltip("Enable camera shake when focusing on a choice")]
public bool EnableCameraShakeOnFocus = true;
[Tooltip("Camera shake intensity when focusing (higher = less shake, lower = more shake)")]
public float CameraShakeIntensity = 30f;
[Tooltip("Camera shake smoothness (0 = instant/jarring, higher = smoother). Controls how fast the camera moves to shake position.")]
public float CameraShakeSmoothness = 10f;
[Tooltip("Scale down multiplier for the FOCUSED choice text (0.9 = 90% size)")]
[Range(0f, 1f)]
public float FocusedTextScaleMultiplier = 0.9f;
[Tooltip("Duration of the text scale animation when focusing (in seconds)")]
public float FocusedTextScaleDuration = 0.3f;
[Tooltip("Duration of the text scale reset animation when unfocusing (in seconds)")]
public float UnfocusedTextScaleDuration = 0.3f;
[Header("Sketch & Fade on Selection")]
[Tooltip("Enable sketch and fade effect on non-selected words when a choice is focused")]
public bool EnableSketchFadeOnFocus = false;
[Tooltip("Material with sketch shader for TextMeshPro")]
public Material SketchMaterial;
[Tooltip("Duration of the sketch effect before fade (in seconds)")]
public float SketchDuration = 0.3f;
[Tooltip("Duration of the fade out after sketch (in seconds)")]
public float FadeOutDuration = 0.5f;
[Tooltip("Intensity of the sketch effect (0 = no sketch, 1 = full sketch)")]
[Range(0f, 1f)]
public float SketchIntensity = 0.8f;
[Tooltip("Final alpha value after fade (0 = invisible, 1 = opaque)")]
[Range(0f, 1f)]
public float FinalFadeAlpha = 0.2f;
}
public enum ChoiceSpawnMode