Files
Project-M/Assets/_Project/Scripts/Client/Presentation/AmbientMotionConfig.cs
T
kronic b407f7cd6f Art/Fix: A0 gate pass — death-pose lock, off-palette drift, lighting debris
Found by running the A0 style-proof against the SHIPPING scene instead of
ArtStaging (which judges static glTF bakes on an import shader, with zero
SkinnedMeshRenderers and no Animator — it cannot answer "does the game look
like this").

Player-facing bugs fixed:

- AC_PlayerTopDown/AC_EnemyTopDown "Death" had ZERO outgoing transitions.
  Any State enters on IsDead and nothing ever leaves. The player ghost is a
  persistent entity, so its Rukhanka animator never resets: once you died you
  rendered sprawled on the seabed permanently — sim fully respawned, moving and
  fighting, visually a corpse. Added Death -> Idle on (IsDead == false).

- AmbientMotionSystem drift was still the deleted biome system: key 0 =
  "meadow", MeadowMoteColor (0.62, 0.85, 0.60) = GREEN motes, 600 of them in a
  36x7x24 box following the camera — the most off-palette thing in the frame.
  Its x>500 region probe pointed at space now holding zero renderers. Collapsed
  to one cold marine particulate; dropped the 4 dead mote colours + AridWind.

- FeedbackFx.MakeParticleMaterial built Sprites/Default with NO texture, so
  every procedural particle rendered as a hard SQUARE. Added a procedural soft
  dot (no Resources.Load — build-stripped; asset-free presentation is the rule).

- Game.unity carried a stock Unity "Directional Light" (warm-WHITE, 1.05, Soft)
  outranking KeyWarm as a second competing shadow caster, plus 6 orphaned
  LandmarkLights — four at x=1030/1530 lighting a kilometre of empty water, two
  with no renderer within 12u, two of them purple. All 7 deleted. Added RimCold
  for silhouette separation; key:fill set to the tuned 3.9:1; WarmPool -> Soft.

ArtStaging (kept as a lighting lab): KeyWarm 0.15 -> 0.85 — it was the only
shadow-caster yet sat BELOW GloamFill 0.22, which destroys form by definition
and is what read as "flat". StagingAmbiance was attached to nothing and its
flora wiring searched for a Game.unity parent, which is what read as "static";
it also force-played the combat one-shot pool, now restricted to looping
emitters. Flicker raised to a measured x2.11 cold swing vs x1.03 warm.

304/304 EditMode green; death-recovery, palette and particulate all verified
live in Game.unity Play.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 14:45:18 -07:00

47 lines
2.2 KiB
C#

using UnityEngine;
namespace ProjectM.Client
{
/// <summary>
/// Live-tunable knobs for <see cref="AmbientMotionSystem"/> — the Phase 1.5 "world alive" ambient layer
/// (per-biome drift particles + idle foliage sway + walk-through rustle). Mirrors the
/// <see cref="WorldAtmosphereConfig"/>/<see cref="DynamicLightConfig"/> bridge idiom: a MonoBehaviour in
/// the gameplay scene with a static <see cref="Instance"/> the client presentation system reads (falling
/// back to these same defaults when absent). Pure presentation — never touches the simulation.
/// </summary>
public sealed class AmbientMotionConfig : MonoBehaviour
{
public static AmbientMotionConfig Instance;
[Header("Master")]
public bool Enabled = true;
[Header("Ambient drift particles (emitter follows the camera; sim space stays world)")]
// 2026-08-07: the four per-biome mote colours + AridWind went with the expedition — LANTERN is one look,
// so the colour is fixed cold in AmbientMotionSystem. Only rate and size stay tunable.
public bool DriftEnabled = true;
[Min(0f)] public float DriftRate = 18f;
[Min(0.01f)] public float DriftSize = 0.07f;
[Header("Idle foliage sway (root tilt) — OFF by default since 1.5b: ALL Synty flora uses the Synty/Foliage")]
[Header("VERTEX-wind shader, so root tilt double-animates. Keep for A/B; rustle below stays the reactive layer.")]
public bool SwayEnabled = false;
[Min(1f)] public float SwayRadius = 30f;
[Min(0f)] public float SwayAmpDeg = 1.4f;
[Min(0.05f)] public float SwayHz = 0.8f;
[Header("Walk-through rustle (local player brushing flora)")]
public bool RustleEnabled = true;
[Min(0.2f)] public float RustleRadius = 1.7f;
[Min(0f)] public float RustleAmpDeg = 7f;
[Min(0.5f)] public float RustleHz = 9f;
[Min(0.2f)] public float RustleDecay = 2.5f;
void OnEnable() { Instance = this; }
void OnDisable() { if (Instance == this) Instance = null; }
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static void ResetStatics() { Instance = null; }
}
}