Round 6 fixes: held tools, headlamp glare, ladder openings, level horizon, roof hulls, rain hits, idle motion, belt packs, meadow variety
- Held tools sit lower and further right; the hammer faces forward and strikes about the camera's right - Headlamp leaves held items, treats and vending machines alone (rendering layer NoLamp); other lights keep lighting them - Hay grounded on the floor in world space (it floated) - Deck fence opens at each ladder, rail colliders split around it; ladders moved to 2 m off the edge middle, clear of the intakes; climbing goes over a rail only if one is in the way - Crew stand to the soil's up (Planet.Level): flat round the base, the ball's up past it, so the horizon stays level on a small planet - Convex roof hulls for the crew cabin, garage, pitched roof and windmill tower; cabin box lowered to the eaves - Rain and acid rain hits differ by surface: soil, grass, wood, metal - Idle motion: dishes pan, sways sway, sensors turn, eyes blink, windmill turns in the breeze, reels and parked rotors tick over - Belt: take tools off at the supply wall; hold E at a vending machine for a pack of 3 on the belt, LMB has one - New meadow pieces: boulders, slab stones, crystals, mushrooms, stump, bulb plants - -demofix checks for all of the above; loc rows in all 11 tables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -72,6 +72,17 @@ namespace GrassCutter
|
||||
static readonly Color NightSky = new Color(0.13f, 0.17f, 0.3f), NightMid = new Color(0.09f, 0.12f, 0.21f), NightLow = new Color(0.05f, 0.07f, 0.11f);
|
||||
|
||||
Light _sun, _lamp;
|
||||
|
||||
/// <summary>Rendering layer of things the headlamp leaves alone: whatever is held right in front of the eyes
|
||||
/// and machines with lights of their own, which it only blew out to white. The sun and the lampposts still light them.</summary>
|
||||
public const int NoLamp = 1 << 1;
|
||||
|
||||
public static void KeepOutOfLamp(GameObject root)
|
||||
{
|
||||
foreach (var r in root.GetComponentsInChildren<Renderer>(true)) r.renderingLayerMask = NoLamp;
|
||||
// a machine's own lights still light it
|
||||
foreach (var l in root.GetComponentsInChildren<Light>(true)) l.renderingLayerMask |= NoLamp;
|
||||
}
|
||||
float _sunPower;
|
||||
Color _sunColor, _fog, _sky, _mid, _low;
|
||||
ColorAdjustments _grade;
|
||||
@ -153,7 +164,12 @@ namespace GrassCutter
|
||||
_lamp.range = LampRange;
|
||||
_lamp.color = new Color(1f, 0.95f, 0.85f);
|
||||
_lamp.shadows = LightShadows.None;
|
||||
_lamp.renderingLayerMask = ~NoLamp;
|
||||
// every other light keeps lighting what the headlamp leaves alone
|
||||
foreach (var l in FindObjectsByType<Light>(FindObjectsInactive.Include))
|
||||
if (l != _lamp) l.renderingLayerMask |= NoLamp;
|
||||
}
|
||||
if (_sun && _sun.renderingLayerMask != -1) _sun.renderingLayerMask = -1;
|
||||
var from = Rig ? Rig : cam.transform;
|
||||
_lamp.transform.SetParent(from, false);
|
||||
// a machine's floodlights join in while you drive it
|
||||
|
||||
Reference in New Issue
Block a user