90d4bed381
Art look LOCKED by the operator from the artlook_* side-by-sides: clean dark-Synty; PixelOutline._MasterEnabled=0 shipped (feature stays dev-toggleable via F3; other fullscreen effects remain backlog). New AmbientMotionSystem (client-only PresentationSystemGroup, the "world alive" anti-static beat, zero netcode): - per-biome DRIFT particles from one world-space emitter following the camera (meadow motes / arid wind-blown dust / cavern motes / blight spores; palette keys on camera-X region + replicated room biome, mirroring WorldAtmosphereSystem's switch) - idle SWAY on the ACTIVE cosmetic flora prop roots near the camera (LOD children follow the root; probed: none static-batched) - walk-through RUSTLE: flora brushed by the local player (GhostOwnerIsLocal idiom) gets a decaying energy shake Rotations write around a cached base (lossless when toggled off); knobs in AmbientMotionConfig (scene object, code defaults when absent). Verified live: drift palettes exact in both regions (meadow 0.62/0.85/0.60 -> arid 0.85/0.68/0.45 on region cross), flora beside the player rocked (0,0)->(-4.0,+5.0) deg within the rustle+sway envelope, 466/466 EditMode, console clean. Discovery for follow-up: the BASE biome's flora props are authored INACTIVE (84 bushes etc.) - the base has no sway targets until some are re-enabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
49 lines
2.2 KiB
C#
49 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("Biome drift particles (emitter follows the camera; sim space stays world)")]
|
|
public bool DriftEnabled = true;
|
|
[Min(0f)] public float DriftRate = 28f;
|
|
[Min(0.01f)] public float DriftSize = 0.09f;
|
|
public Color MeadowMoteColor = new Color(0.62f, 0.85f, 0.60f, 0.35f);
|
|
public Color AridDustColor = new Color(0.85f, 0.68f, 0.45f, 0.28f);
|
|
public Color CavernMoteColor = new Color(0.55f, 0.65f, 0.95f, 0.33f);
|
|
public Color BlightSporeColor = new Color(0.72f, 0.50f, 0.85f, 0.33f);
|
|
public Vector3 AridWind = new Vector3(2.2f, -0.15f, 0.5f);
|
|
|
|
[Header("Idle foliage sway (flora prop roots within view of the camera)")]
|
|
public bool SwayEnabled = true;
|
|
[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; }
|
|
}
|
|
}
|