"Sandbox.Decal renders differently on each peer due to random self-seed"
▸ SYMPTOM
A decal spawned with the same parameters on multiple peers renders with different silhouettes, rotations, scales, or color tints. The visual inconsistency is cosmetic but breaks the illusion of a shared world.
▸ CAUSE
Sandbox.Decal self-seeds with Random.Shared.Int(10000) on enable. This random seed drives the silhouette pick (from the Decals list) and the Rotation/Scale/ColorTint ParticleFloat/Gradient evaluation. Since each peer has an independent random state, the same decal evaluates to different visual parameters on each machine.
▸ FIX
To force a byte-identical decal on every peer:
- Single-element
Decalslist — pick the silhouette deterministically yourself instead of letting the random seed choose from multiple options. - Constant
ParticleFloat/Gradientvalues — a plainfloatcast toParticleFloatorColorcast toParticleGradientproduces aConstantwhoseEvaluateignores the random seed entirely.
decal.ColorTint = (ParticleFloat)1.0f; // constant, ignores seed
decal.Scale = (ParticleFloat)0.5f; // constant, ignores seedWith a single silhouette and constant parameters, the per-instance seed has zero observable effect.
▸ WHY IT WORKS
ParticleFloat.Evaluate(seed) on a Constant type returns the constant value regardless of the seed — the randomness only affects CurveRange and Random types. By constraining all variable parameters to constants, the decal's visual output becomes fully deterministic.
- Published