Commit Graph
352 Commits
Author SHA1 Message Date
adminandClaude Opus 4.8 c29cd172bf Destroy pre-match objects on seek and block hunter wall-climb while hiding
Destroy every GameObject tagged "PreMatch" locally when the match enters
the Seek sub-phase (hooked in ApplyPhaseLocal, runs on every machine; the
objects are plain scene geometry with no NetworkObject, so each client
cleans up its own copies). Block hunters from starting a wall- or
ceiling-climb during the Hide sub-phase via a WallClimbBlockedNow() gate
in UpdateWallClimbState; an in-progress climb is exited cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 20:05:09 +02:00
adminandClaude Opus 4.8 6fcada4631 Keep the pan limit constant across zoom and hand off cleanly to free cam
Two paint-mode pan refinements:
- The max-distance clamp is back to body-relative only (CurrentScale, no zoom
  factor), so the world-space pan limit is identical at every zoom level;
  only the sensitivity stays zoom-scaled (finer when zoomed in).
- Don't zero the pan offset in OnDisable. The only thing that disables this
  component is FreeCamMode taking over, and the freecam snaps to the live
  (still panned) view. Zeroing here jumped the orbit camera the brain blends
  FROM to center while the freecam sat at the panned pose - the visible
  "snap to 0, then translate to the offset" on the paint->free-cam switch.
  Leaving the offset frozen keeps blend-from == blend-to (both panned) for a
  seamless handoff; the pan glides home on its own once the orbit input next
  runs in a non-paint mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 19:53:35 +02:00
adminandClaude Opus 4.8 5965f7199a Suppress global hotkeys while a text field is focused
The save-dialog name field is a focused TMP_InputField, but global discrete
hotkeys kept reading the keyboard every frame, so typing a name like
"Checkers" cycled the pose (C) and shut the server down (K). Add a shared
TypingGuard.IsTyping check (focused TMP/legacy InputField) and short-circuit
the global handlers on it: pose cycle, network dev keys, mode switch, and
paint undo/redo. Movement was already gated out via ControlEnabled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 19:53:26 +02:00
admin b951556f35 Update The Room materials and refresh brush assets 2026-06-30 19:25:53 +02:00
admin 6bedc7cf3e Serialize the paint-mode pan tunables in Main 2026-06-30 19:25:48 +02:00
adminandClaude Opus 4.8 3fa99f32fe Keep the paint-mode pan on release and scale it by zoom
The middle-mouse pan now persists when the button is released and only glides back to center on leaving paint mode. Pan sensitivity and max distance scale with the orbit zoom distance, so panning stays consistent on screen at any zoom and unchanged at the default zoom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 19:25:45 +02:00
admin 4e8a907a8c Add a square brush and wire up the HUD brush preview
Add the BrushesSquare texture, replace the duplicated brush slots on the
player with it, show a brush preview in the paint HUD, and surface the
spawn-area tags and conversion reveal delay in the inspector.
2026-06-30 18:37:23 +02:00
admin 9a90b772d7 Add a second pose to the hunter variant 2026-06-30 18:20:29 +02:00
admin f1ab62b061 Author the alpha sliders, reset button, and slider curves in the HUD
Add Slider_AlbedoAlpha / Slider_EmissionAlpha, the Lib_ResetHud button,
and SliderCurve components to the paint HUD panel.
2026-06-30 18:20:26 +02:00
adminandClaude Opus 4.8 057c99fa1d Persist material scalars, reset the HUD, and split alpha from the picker
Save and restore the emission intensity and the three camo knobs
(half-Lambert, half-Lambert brightness, specular dampen) with a named
painting. The .paint format moves to v3 with a small scalar block
between the header and the pixel maps; v2 paintings still load with
their painter values left untouched. Loading re-syncs the emission and
camo sliders, and peers pick the values up for free through the
existing owner-authoritative paint NetworkVariables.

Add a HUD reset (Lib_ResetHud button plus context-menu fallback) that
behaves as if the saved hud-layout file were deleted: it removes the
file, restores panels to their authored prefab positions, and resets
the brush values to the painter/material defaults captured before any
carry/restore runs.

Remove the alpha bar from HsvColorPicker so alpha is driven by
standalone Slider_AlbedoAlpha / Slider_EmissionAlpha bindings; the
picker now writes RGB only and the sliders write alpha only, with no
feedback between them. Add a generic SliderCurve component that reshapes
a slider's handle position into a non-linear value (with an inverse for
setting values back), and make the slider wiring curve-aware.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 18:20:13 +02:00
adminandClaude Opus 4.8 fe8f12b8bb Spawn converted hunters in place and smooth their reveal
Fix the in-place Conversion respawn snapping to the origin (0,0,0),
which surfaced when a hider was tagged mid wall-climb. The owner holds
authority over the NetworkTransform, so the server's Instantiate
position is ignored on the owner. Deliver the tagged world position
through a replicated _spawnOverride the server writes in OnNetworkSpawn,
and have the owner re-assert it before PlayerCharacterController's first
Update snapshots the kill-plane rescue target. This replaces the fragile
SpawnedMidSeek phase check.

Also hide a freshly converted hunter on other clients for a short
settle window (conversionRevealDelay) so nobody sees it pop in or
interpolate from the spawn frame; the shot hider is already despawned,
then the hunter cleanly materializes in its place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 16:18:53 +02:00
admin 24de7ef3da Select the conversion match mode in Main 2026-06-30 15:20:58 +02:00
adminandClaude Opus 4.8 f485d1676b Add the conversion match mode
Introduce a second match mode alongside Classic. In Conversion mode
hiders are invisible to each other (and to hunters during Hide), and a
hunter hit converts the hider into a full hunter in place instead of
sending them to the spectator freecam. The mode is replicated to all
clients through the existing phase named-message byte; visibility is
computed locally per client per mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 15:20:54 +02:00
admin 1f46e6258d Raise reflection intensity across the scenes
Bump reflection intensity to 0.75 in the lobby, test map and The Room, and warm the subtractive shadow colour in The Room.
2026-06-30 14:00:03 +02:00
admin 8fcf2d6de0 Tune the match phase durations and shooting in Main
Set hideDuration 30, seekDuration 60, resolveDuration 10, shootRange 100 and shootCooldown 1.5 on the MatchManager.
2026-06-30 13:59:57 +02:00
adminandClaude Opus 4.8 5b3fe1d3d1 Add the hide/seek/resolution match state machine
Drive the match through three server-authoritative phases (hide, seek,
resolution) with per-phase durations, broadcasting the active phase and
countdown to clients over the existing named-message infrastructure so
MatchManager stays a plain MonoBehaviour and Main keeps zero in-scene
network objects.

During hide, hider meshes are culled on hunter clients only (each client
computes visibility locally from role, phase and found state). During
seek, hunters shoot a single raycast from the first-person camera centre
(left click, cooldown-gated); a validated hit marks the hider found,
which hides its mesh for everyone and binds the owner to spectator
freecam. Seek ends early once every hider is found, then resolution runs
before returning to the lobby.

Force AlwaysAnimate on remote replicas so the animator keeps writing bone
transforms while the body is hidden or off-screen. The Paintman animator
is authored CullUpdateTransforms, so a culled renderer froze the pose on
the rest pose and the skinned collider baked that frozen pose, landing
replicated paint stamps on the wrong body location and leaving the
painting desynced after hiders were shown again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:59:46 +02:00
admin 95effb91da Set the hunter count and re-enable the camera component in Main
Bump hunterCount to 1 and re-enable the disabled camera component on the
main camera.
2026-06-30 12:03:33 +02:00
admin 7198968cc6 Author spawn area colliders and tags in The Room
Add the SpawnArea, HunterSpawnArea, HiderSpawnArea and PreMatch tags and
author the spawn area colliders in The Room scene.
2026-06-30 12:03:29 +02:00
adminandClaude Opus 4.8 c1a13f6338 Pick role-specific spawn areas with a shared fallback
Choose the spawn area by player role: Hunter avatars look for a
HunterSpawnArea-tagged collider, Hiders for HiderSpawnArea. When the
role-specific area is missing, fall back to the shared SpawnArea tag, and
when that is absent too, keep the existing client-id ring placement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 12:03:22 +02:00
admin 1e17b90358 Add the hero cutout to the main camera and tune the deoccluder
Attach the HeroCutout component to the Main Camera with dialed-in cone values (radius 0.42, feather/depthFeather 0.15) and lower the deoccluder MinimumDistanceFromTarget to 0.05.
2026-06-30 08:42:06 +02:00
admin 3709bf76db Swap the living-room and shared materials to the new shader
Point the living-room set and the shared materials at the new shader GUID and clear the stale MOTIONVECTORS pass / custom render queue overrides.
2026-06-30 08:42:02 +02:00
adminandClaude Opus 4.8 04c73623d3 Pick the material of the hit submesh on multi-material renderers
PickFromForeignMaterial read rend.sharedMaterial, which is always slot 0, so any renderer with several materials (one per submesh) always sampled the first material's values. Resolve the submesh from the hit triangle (collider triangleIndex, or the recovered render-mesh triangle) and read sharedMaterials[submesh] (clamped) instead. Single-material renderers stay on slot 0, byte-identical to before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 08:41:57 +02:00
adminandClaude Opus 4.8 06f5f33e63 Drive the hero cutout from a single camera-to-target ray
Replace the multi-sample silhouette probe with one camera->target raycast: any world geometry in the line of sight arms the cut, a clear line keeps occluders solid. The shader carves a world-space cone (apex at the camera, radius growing toward the target) so the screen-space hole stays a constant size regardless of occluder depth, with a soft radial fade plus a symmetric axial fade around the target so geometry just behind the player feathers out instead of hard-cutting along a plane. Anything well past the target stays solid. Also suppresses the deoccluder pull-in so the camera holds its orbit distance and the cut takes over.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 08:41:52 +02:00
admin 1aa1f6d869 Tune the corner guard and persist the eyedropper toggle on the player
Dial corner guard to 70 degrees / 0.7 fraction and serialize the
pipetteAlbedoFromScreen toggle on the player prefab.
2026-06-29 20:58:12 +02:00
adminandClaude Opus 4.8 fd2cc9eb98 Block paint dabs that wrap too far around corners
Add a geometry-based gate in PaintAtScreen that estimates how much of the
brush footprint lands on faces whose normals deviate sharply from the hit
surface. When that fraction exceeds the threshold the whole dab is
suppressed (no draw, emit, or undo mark) instead of smearing around the
edge. Backend-independent (no GPU readback) and winding-robust. Tunable via
cornerGuard / cornerGuardAngle / cornerGuardMaxFraction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 20:58:07 +02:00
admin 7e5e33e228 Move the network prefabs list to Assets root and tidy editor tooling
Move DefaultNetworkPrefabs.asset out of Assets/Settings back to the Assets root (where NGO expects it), and fix the PlaySceneWindow domain-reload toggle to read and write EnterPlayModeOptions correctly.
2026-06-29 20:12:58 +02:00
admin fbbc46cc6e Update scenes, lighting and materials
Authoring pass on The Room plus lighting tweaks across Lobby and Main, add a new Gold material, and bump the PC renderer SSAO intensity and radius.
2026-06-29 20:12:49 +02:00
admin b091f1175b Add camo sliders to the paint HUD and tune the player
Add the HalfLambert, HalfLambert brightness and specular-damp sliders to the paint HUD panel, dial the camo values on Player.mat, and disable shadow casting on the Paintman renderer so the player's cast shadow no longer gives away its position.
2026-06-29 20:12:44 +02:00
adminandClaude Opus 4.8 7c84f6ba92 Expose the camo knobs in the HUD, persist and replicate them
Surface the PlayerCamoLit material knobs (HalfLambert, HalfLambert brightness, specular dampen) as material-backed properties on MeshPainter, guarded by an IsReady gate since the HUD binds before the material instance exists. Wire the three HUD sliders to them and seed the sliders from the live material once the painter is ready. Persist the values into the same HUD JSON as the brush settings (with a hasCamoValues flag so pre-camo save files never clobber the authored material) and carry them across a scene-switch respawn. Replicate them owner-authoritatively via a NetworkVariable in PlayerPaintSync, exactly like emission intensity, so remotes and late joiners show the same camo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 20:12:39 +02:00
adminandClaude Opus 4.8 b5bd1fdb8b Rework the camo shader to flatten toward darkness, drop FormSoftness
Rebuild the camo controls around hiding a painted player in a dark scene. _HalfLambert is now a two-segment curve (0 = no effect / URP Lit, 0.5 = classic half-lambert soft terminator, 1 = fully flat) and a companion _HalfLambertBrightness (-1..1) additively shifts the flattened diffuse so the body tone matches the scene. _SpecularDampen still scales down the direct highlight. The view-coupled _FormSoftness normal-bend is removed entirely (it flipped light/dark with the camera); all knobs are now term-based and view-independent, and stay byte-identical to URP/Lit at their no-op values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 20:12:31 +02:00
adminandClaude Opus 4.8 67e3696339 Add a toggle for picking foreign albedo from screen or material
The hybrid foreign-object pipette previously always overwrote albedo with the lit on-screen pixel. Gate that behind a new serialized pipetteAlbedoFromScreen flag (default off): off reads albedo texel-exact from the material like the other channels, on takes it from the rendered, fully-lit pixel. The data channels still always come from the material.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 20:12:19 +02:00
admin 4da2e3a70c Update scenes, lighting and glass materials
Heavy authoring pass on The Room scene plus lighting/render tuning across
scenes: Lobby gets lower ambient/reflection intensity, softer shadow
strength and a baked lighting data asset; Main and Test Map drop their
lighting data/settings links. Replace the living-room Glass materials with
reworked versions under Assets/Materials, update BrightDaySettings, and set
hunterCount to 0 in Main.
2026-06-29 16:24:12 +02:00
admin e351336b39 Reorganize project folders and clean up editor tooling
Move editor scripts to Assets/Scripts/Editor (PlaySceneWindow, SceneCollection),
move DefaultNetworkPrefabs and the Main Camera custom blends asset into
Assets/Settings, and shelve the unused HeroCutout shader/include under
Assets/Unused. Rename the Chameleon background texture, delete the obsolete
DefaultParentForEditor script and New Lighting Settings asset, add a The Room
SceneCollection asset, and drop the redundant Assets menu entry from the
StraightenKnees tool.
2026-06-29 16:23:50 +02:00
admin 42c5fcc323 Apply camouflage material to the player
New Player.mat using Custom/PlayerCamoLit, assigned to the Paintman renderer
on the Player prefab so the camo shader is active on hunters and hiders.
2026-06-29 16:23:14 +02:00
admin 3f48823513 Remove second-pipette toggle and preview from paint HUD
Drop the now-unused Toggle_PipetteScreen and the Preview element from the
paint HUD panel after consolidating back to a single (hybrid) pipette.
2026-06-29 16:23:03 +02:00
adminandClaude Opus 4.8 05cd52aa5e Add player camouflage shader
Custom/PlayerCamoLit is a URP 17 Lit clone whose ForwardLit pass routes
through PlayerCamo.hlsl - a faithful copy of UniversalFragmentPBR that
delegates all GI/APV/shadow/cluster-light helpers unchanged and only swaps
the three light calls for a camo variant. Three sliders flatten the form
cues that give a painted player away: _FormSoftness bends the per-pixel
normal toward the camera (softens diffuse + specular + reflections),
_HalfLambert lifts the diffuse shadow side, _SpecularDampen scales down the
direct highlight. All sliders at 0 are byte-identical to URP/Lit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 16:22:57 +02:00
adminandClaude Opus 4.8 188f16a4e8 Make the eyedropper a hybrid material/screen pick
On a foreign object the pipette now reads the data channels
(metallic/smoothness/occlusion/emission) texel-exact from the material
while taking albedo from the rendered, fully-lit on-screen pixel - so the
picked colour honours baked lightmaps/ambient/SSAO while keeping the
material's PBR fidelity. Falls back to a pure screen pick when no readable
UV is available. Pull the render+readback out of PickFromScreen into a
shared TrySampleScreenColor.

The pipette now also arms on Ctrl (in addition to Shift), and Ctrl+wheel
resizes the brush; the orbit camera ignores the wheel while either modifier
is held so it does not zoom and resize at once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 16:22:45 +02:00
admin db10eef525 Add Play Scene Tool 2026-06-29 12:17:25 +02:00
admin fd869c9cf8 set living room prefabs as static for lightmap baking 2026-06-29 12:16:39 +02:00
admin 70e926bd82 Build out The Room scene with ProBuilder geometry
Author The Room environment and update ProBuilder editor settings used to
build it (cube shape size, select mode, shape builder defaults).
2026-06-28 23:02:36 +02:00
adminandClaude Opus 4.8 a7a4fbdcb7 Carry first-person facing into orbit camera on mode switch
When leaving first person for an orbit mode (Paint / Player Control), snap
the orbit axes to Camera.main's current view direction instead of restoring
the orbit's last-used angle. With WorldSpace binding + Sphere orbit + a
centered composer the camera look rotation is exactly
Euler(VerticalAxis, HorizontalAxis, 0), so the inverse mapping is exact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 23:02:31 +02:00
admin 054cadbd80 Tune player role scales, poses and render settings
Hunter scale 2.4 -> 1.5 and Hider 0.7 -> 0.5; Player prefab character
controller step offset and skin width tweaks (plus Unity field reserialization).
Pose assets get fall-clip fields and slightly lower controller height/center.
Lower SSAO intensity and radius in PC_Renderer; QualitySettings reserialized
by Unity (mesh LOD threshold, Switch 2 target).
2026-06-28 21:40:27 +02:00
admin 604adcdfd4 Add The Room scene with living room environment, use it as the match scene
New The Room scene built from the Barking_Dog living room asset: prefab
variants under Assets/Prefabs/3D Living Room, an Environment Light prefab and
baked lighting settings. Point MatchManager at The Room (was Test Map) and
swap it into the build settings scene list. Floor_Wood material and the
living room meta files are reserialized by the URP/Unity importer. Main.unity
also carries the inspector-pinned defaults of the orbit-zoom and hunter-count
fields (matching the C# defaults, no behavior change).
2026-06-28 21:40:18 +02:00
adminandClaude Opus 4.8 62cf0eae04 Scale third-person orbit zoom range and default by player size
The orbit radius (min/max/default and per-notch step) was in absolute world
units and ignored the player's localScale, so a small Hider started too far
out and a large Hunter too close and could not zoom out far enough. Multiply
range, step and default radius by the follow target's lossyScale (PlayerScaler
keeps the body uniformly scaled), making the inspector fields size-1 design
values that frame every role body-relative. Re-clamp every frame so a runtime
grow/shrink stays in range. GameModeManager.BindLocalPlayer calls ResetZoom
after rebinding so each new avatar starts at its scaled default zoom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 21:39:41 +02:00
adminandClaude Opus 4.8 0834419a56 Make the number of hunters configurable in MatchManager
StartMatch rolled exactly one random Hunter. Add a serialized hunterCount
field (default 1, [Min(0)], inspector-tunable) and roll N distinct random
Hunters via a partial Fisher-Yates on the client-id list, clamped to the
player count: 0 = all Hiders, >= player count = all Hunters. The match
sequence now carries a HashSet of hunter ids instead of a single id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 21:39:30 +02:00
adminandClaude Opus 4.8 346a0c6e8c Fix eyedropper sampling base map at wrong UV on convex/primitive colliders
hit.textureCoord is only filled for non-convex MeshColliders; on a convex
MeshCollider (or Box/Sphere/Capsule) it returns Vector2.zero, so the pick
sampled the foreign material's base map at texel (0,0) - a constant, wrong
color ("base map ignored"). Now the UV is recovered from the renderer mesh
itself (camera ray vs triangles, Moeller-Trumbore, barycentric UV) for
convex/primitive colliders, with the screen-pixel pick as fallback when the
mesh is not readable. The fast non-convex path is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 21:39:25 +02:00
admin f9312d8a69 Lower camera near clip plane to 0.01
Drop the third-person/main camera near clip from 0.1 to 0.01 so the view
does not clip into the player up close.
2026-06-28 17:19:23 +02:00
adminandClaude Opus 4.8 ac25f59232 Add radial hero-cutout shader for third-person camera
Reveal the player when geometry sits between the orbit camera and the
character: a screen-space circular mask in a URP/Lit clone (HeroCutoutLit)
clips occluders in front of the player, depth-gated so only geometry nearer
than the hero is cut. The cutout lives outside UnityPerMaterial (SRP batcher
intact) and is a no-op when disarmed, so occluders look identical to URP/Lit.

A runtime driver (HeroCutout.cs on Main/GameManager) feeds the player's
screen position, radius, feather and depth into global shader properties and
only arms while the third-person orbit vcam is live; it disarms in
first-person, free-cam and the pause menu. Applied to the lobby walls via a
dedicated occluder material (floor left solid). Shipped but shelved for now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 17:18:32 +02:00
adminandClaude Opus 4.8 b6aaf69235 Add Shift brush controls to paint mode
Hold Shift to momentarily enable the pipette (restores prior state on
release) and Shift+Scroll to resize the brush. The orbit zoom ignores the
wheel while Shift is held so it does not zoom and resize at once. The HUD
brush-size slider follows live via a BrushSizeChanged event, and the brush
preview now stays visible while Shift is held (drawn before the pipette
early-return) so the new size is visible while scrubbing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 16:20:25 +02:00
admin 4e27b1e729 Disable editor network bootstrap in builds; tune scenes and paint HUD panel
NetworkBootstrap now destroys itself outside the editor. Camera FOV/background
tweaks in Main, lobby light intensity, and paint HUD panel font/color polish.
2026-06-28 15:51:49 +02:00