Remove the second HeroCutout from the Main Camera (the GameManager host is the
intended, single driver), set the GameManager cutout radius/feather, and set
hunterCount to 0.
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.
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.
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.
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).
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>
NetworkBootstrap now destroys itself outside the editor. Camera FOV/background
tweaks in Main, lobby light intensity, and paint HUD panel font/color polish.
Main scene gets a full-rect Background image (Chameleon Background 1) in
the menu UI and re-enables a UI component. Lobby scene receives extensive
authoring (sky, lighting, props). New Lobby Sky and White Glow materials;
Yellow Glow emission toned down from ~89 to 64.
The debounced auto-save compared painter values against the on-disk
baseline, so after any slider/toggle change the values stayed different
every frame and the 0.5s timer was pushed forward endlessly, never
firing. Saving only happened via the direct drag-end path. Compare
against the previous-frame snapshot instead so the timer fires once the
values settle. Also pin hudSaveId to a stable key so the layout is
shared across scenes instead of split per-scene.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MouseSensitivity is a static, PlayerPrefs-backed multiplier (default 1,
clamped 0.1-4.0) that scales the mouse-look delta in the FreeCam,
FirstPerson and ThirdPerson controllers. Writes flush immediately so the
value survives a hard build exit. MouseSensitivitySlider binds the
Settings-panel slider to it (range read from the inspector) and mirrors
the value into its label, syncing on panel open via OnEnable.
Main.unity now contains the session-manager canvas directly (the
Online Session Manager prefab was unpacked) and wires the slider binder.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Panel shows in Main while disconnected, auto-hides once a connection is
established, and toggles open/closed with Escape in the Lobby or on a Map.
- Escape now pauses gameplay (active mode exits, cursor freed, paint and
movement disabled) instead of ending the match directly; closing restores
the prior mode via SwitchTo.
- Disconnect button is context-aware: leaves the session in the Lobby, acts
as "Back to Lobby" (EndMatch) for the match authority on a Map, and stays a
plain disconnect for non-authority clients on a Map.
- Removed the Escape->EndMatch handler from MatchManager; match end now routes
through RequestEndMatch with the same authority routing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Players can now host and join over the internet without port-forwarding
via Unity Gaming Services Relay + Lobby, exposed through the unified
Multiplayer Services SDK (Sessions API).
- OnlineSessionManager: anonymous auth, CreateSessionAsync (public,
relay-backed), QuerySessionsAsync server browser, JoinSessionByIdAsync,
and session leave wired into the existing net-stop teardown.
- Per-install auth profile derived from the project path
(mirror_<sha1(dataPath)>) so junction-mirror clones get distinct UGS
player ids, avoiding the same-machine 409 LobbyConflict on join.
- Install com.unity.services.multiplayer 2.2.4 (pulls Relay/Lobby/
Authentication/Core) and attach OnlineSessionManager to the
NetworkManager in Main.
Loopback dev flow (NetworkBootstrap H/C/J/K) is left untouched; the
online path is additive. MatchManager and gameplay are unchanged since
Sessions starts the host/client through NGO as before.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mid-match joiners now spawn a dedicated empty Spectator prefab (NetworkObject
+ SpectatorSetup only) instead of a fully stripped Player prefab. The FreeCam
rig is a standalone scene object in Main, so the spectator needs no avatar body,
renderer, collider, or CharacterController -- eliminating the leftover-body
artifact and the fragile per-peer strip path entirely.
- SpectatorSetup.cs (new): owner binds GameModeManager.BindSpectator (FreeCam-only)
- Spectator.prefab (new): empty avatar (Transform + NetworkObject + SpectatorSetup),
registered in DefaultNetworkPrefabs, wired on MatchManager in Main
- GameModeManager: add BindSpectator/BuildSpectatorModes; drop the spectator
branch from BindLocalPlayer; ReleaseToNoPlayer frees the cursor on teardown
- MatchManager: independent entropy-seeded RNG for fair hunter pick (was sharing
the global engine RNG and always landing on the same client); spawn the
spectator prefab for mid-match joiners; cursor-safe return-to-Main teardown
- FreeCamController: guard IgnorePlayerCollision against a disabled capsule
Also bundled (unrelated user asset/UI edits): PaintHudPanel layout tuning,
font atlas (arialroundedmtprocyr_bold SDF), forestpack_foliage material.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the connection-approval role selection with a server-authoritative
match flow built on NGO additive scene management:
- Scenes: Main is the persistent foundation (NetworkManager, GameModeManager,
cameras, HUD); Lobby and Test Map load/unload additively. Add Lobby + Test Map
to the build settings; remove the obsolete SampleScene.
- MatchManager (plain MonoBehaviour singleton): loads Lobby on server start,
StartMatchTrigger lets the host start the match, rolls one random Hunter (rest
Hider), swaps Lobby -> Test Map (strictly serialized per NGO), respawns each
player as its role variant. Forces additive client sync mode so clients keep
Main instead of single-loading it (fixes "Destination scene is not valid").
- Server-driven spawning: null out NetworkConfig.PlayerPrefab at runtime to
disable auto-spawn, then spawn players after the lobby floor exists (fixes
falling through the floor) with double-spawn and transition guards.
- StartMatchTrigger: server-gated OnTriggerEnter, only the host's own player
starts the match.
- NetworkBootstrap: drop role selection / connection approval; everyone spawns
as the neutral Player prefab. Host/Client/Server/Shutdown buttons stay.
- NetworkPlayerSetup.ScopedModes flag (baked on Hunter/Hider prefabs): lobby
avatar gets the full mode set, match variants get the role-scoped set.
- GameModeManager.BindLocalPlayer reads ScopedModes and rebinds the painter
unconditionally (fixes stale painter binding on respawn -> brush painting in
every mode).
- MeshPainter.PaintingEnabled defaults to false (unbound/pre-spawn/remote never
paints); PaintHud visibility now also gates on a bound painter (fixes the HUD
showing at startup before any avatar exists).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Roles are chosen in the bootstrap dev panel before Host/Client. NGO
ConnectionApproval is enabled at runtime and maps the role payload to
the matching prefab variant per connection (Hunter/Hider), so each peer
spawns the correct avatar including the host.
- PlayerRole.cs (new): single source of truth enum { Hider, Hunter }.
- NetworkBootstrap.cs: role toggle, ConnectionApproval + role payload,
server ApprovalCheck mapping role -> PrefabIdHash.
- NetworkPlayerSetup.cs: serialized PlayerRole field + Role property.
- GameModeManager.cs: BuildModes(role) - Hunter -> [First Person, Paint],
Hider -> [Third Person, Paint, Free Cam]; binds role from spawned avatar.
- Hunter.prefab: role = Hunter override.
- SampleScene.unity: NetworkBootstrap prefab references wired.
Also includes user inspector scale tuning (Hunter 2.5->2.4, Hider 0.5->0.7).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Install Netcode for GameObjects 2.13.0 + Unity Transport 2.6.0 and wire up
the first networking milestone: syncing player position/rotation across clients.
- NetworkBootstrap: Host/Client/Server controls (OnGUI + H/C hotkeys) for
local clone testing over loopback 127.0.0.1:7777.
- NetworkPlayerSetup: per-avatar owner gating. The local owner binds the
GameModeManager and cameras to itself; remote avatars disable their
controller/CharacterController and receive transform via NetworkTransform.
- GameModeManager.BindLocalPlayer: central runtime rebind to the locally
spawned player.
- FirstPersonController.SetPlayer: explicit runtime rebind hook.
- Player prefab: NetworkObject + NetworkTransform (owner-authoritative,
position + rotation) + NetworkPlayerSetup; registered as PlayerPrefab.
- Scene: NetworkManager + UnityTransport added; the fixed scene player
instance removed in favor of spawn-on-connect.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Play a dedicated falling animation when the player is airborne and
descending past a scale-aware velocity threshold.
- PlayerCharacterController: new IsFalling state + Fall Animation Speed
threshold (true only when !grounded && !wallClimbing && descending,
scaled via CapsuleScale); explicitly false during wall/ceiling climb.
- PlayerPose: per-pose Fall Clip + Fall Clip Speed (mirrors walk/run).
- PlayerPoseController: select the fall clip while falling, fall back to
the idle clip when a pose has none (no regression).
- Author content: Paintman-Fall.anim assigned to Pose_Idle; UMotion
project, Player prefab and scene authoring.
- Docs: check off the fall animation in GAME_DESIGN.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce a FirstPersonController / FirstPersonMode pair (mirroring the
free-cam mode) wired into the GameModeManager Tab cycle. In first person the
mesh is hidden, the eye sits on CameraTarget plus a per-pose
firstPersonCameraTargetYOffset, and the character body yaw is driven to match
the camera via a new single-writer FaceYaw hook on PlayerCharacterController.
Also includes user content edits (poses, prefabs, scene) carried along.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FreeCamController: ease movement via dt-correct Vector3.SmoothDamp on a world-space velocity (accel/decel ramp) and lag the look with Mathf.SmoothDampAngle. Both are framerate-independent and collapse to instant at smoothTime 0; smoothed state is snapped on activation (SyncToCurrentView) so entering freecam never jumps to catch up.
Bundles accumulated deferred work: PlayerScaler uniform-scale helper, scale-aware wall/ceiling climb probes and the double-scale skinned-collider bake fix, plus user content authoring (Sit pose + animation, font SDF, scene/prefab edits).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
In an inner wall/ceiling corner the body's facing flipped ~9 deg every
frame. Recorded frame data showed the wall/ceiling classification flipping
160 times: _wallNormal.y swung the full range (0.0 wall <-> -0.966 ceiling)
each frame, far past the hysteresis band, so the Schmitt trigger could not
hold it.
Root cause: _wallNormal had two competing per-frame sources.
- The contact-normal blend (Update) mixes ceiling and wall contacts in the
corner into ~(0,-0.97,-0.26), classified as ceiling.
- ProbeWall raycasts along -_wallNormal, which tilts toward the wall, so the
ray clips the wall and returns (0,0,-1), classified as wall.
Wall and ceiling drive different rotation targets (snap to face-wall vs.
face movement direction), producing the per-frame twitch.
Fix:
- The contact blend no longer overwrites _wallNormal during an active climb
(it only seeds the initial grab); the probes own the normal while climbing.
- Surface-aware probing: on a ceiling, probe straight up (ProbeCeiling)
instead of along -_wallNormal, so the angled ray can no longer clip the
wall and demote us. Stay latched on the ceiling until it is genuinely gone
overhead, then fall back to the wall probe.
Also retains the ceiling-class hysteresis (Schmitt trigger on the normal's
downward tilt) from the prior attempt as added stability.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Each PlayerPose now carries its own collider center Y, radius and height,
eased and routed to the CharacterController via a SetCapsule single-writer.
This lets crawl poses (Ball/Star) shrink the capsule to fit under furniture.
The ceiling Y offset is removed; poses without authored sizes fall back to
the base capsule, so existing poses keep their collision.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace unreliable raycast parity on open-shell meshes with editor-baked
voxel grids. ConcealmentVolume bakes an inside-mask per object using the
union of a generalized-winding-number test (solid material, robust to open
shells) and an exterior flood-fill (enclosed cavities). ConcealmentMeter
now prefers baked volumes via an O(1) world-space lookup through a registry,
falling back to the old concave parity only for un-baked colliders.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce a free-fly camera as the next entry in the Tab mode cycle
(Player Control -> Paint -> Free Cam):
- FreeCamController: dedicated CinemachineCamera plus a CharacterController
mirroring the player capsule (radius 0.1, height 1.3, slope 59, step 0.15)
so the free camera collides with walls/ceiling/floor exactly like the
player. WASD/Q-E (and Space/Ctrl) fly relative to view; mouse looks.
- FreeCamMode: plain-C# GameMode mirroring PaintMode, with an Exit() that
restores camera priority and re-enables player control + camera input.
- GameModeManager: register freeCam in the Tab cycle (gated like player).
- Scene: FreeCamera object wired, Main Camera custom blends (0.4s) for the
vcam priority hand-off.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add cameraTargetYOffset to PlayerPose so each pose can offset the
Cinemachine ThirdPersonCamera follow/look target independently of the
body mesh. PlayerCharacterController gains a cameraTarget reference
(auto-resolved via the "CameraTarget" child, base position captured in
Awake) and a single-writer SetCameraTargetLocalYOffset. PlayerPoseController
eases the per-pose camera offset and composes it with the shared ceiling
offset, so the camera target follows the ceiling lift in lockstep with the
mesh. Wire cameraTarget explicitly in SampleScene.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Import Barking Dog's free URP-ready interior asset (~41 MB, 155 assets:
meshes, textures, materials, prefabs) as the small interior map, and
populate SampleScene with its geometry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- PlayerPoseController: add applyFootIK toggle (default off) and apply it
to each pose playable so straight-knee idles render straight; Mecanim
foot IK was bending the knees to plant the feet (162° instead of 180°).
- Add Pose_Ball / Paintman-Ball animation and reorder the pose list.
- Move StraightenKneesTool editor utility under Assets/Unused/Editor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Import Mixamo humanoid Walking + Running FBX, switch rig type to Humanoid
- Wire walkClip/runClip with per-clip speeds on Pose_Idle (walk 1.4, run 1.5)
- Add per-animation speed sliders (Range 0.1-3, default 1) to PlayerPose SO,
applied per frame in PlayerPoseController for live tuning
- Reorganize pose assets: replace Pose_TPose with Pose_Hold, prune legacy
Paintman-Run/-TPose .anim and paintman_UV.FBX
- Ignore UMotion plugin data/editor folders
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ConcealmentMeter: standalone component measuring the percentage of the
character volume embedded inside environment geometry (bake -> voxelize via
column ray-stabbing parity -> classify interior voxels against box/sphere/
capsule/convex colliders and terrain). Always-on, throttled, gizmo debug.
- SkinnedColliderBaker: sole per-frame collider bake owner for skinned rigs.
MeshPainter now delegates baking and only borrows BakedMesh for the GPU
raster and cache refresh, so the collider stays fresh outside paint mode.
- Move pose assets to Assets/Poses, retire unused Insect scripts to
Assets/Unused, restore Paintman.controller; mode scripts and scene updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New PlayerPose ScriptableObject (AnimationClip + ceiling Y-offset) and
PlayerPoseController that drives poses via a PlayableGraph, overriding the
Animator controller. Poses are held continuously (idle, moving, on wall/
ceiling) so cycle and sprint changes show immediately. Sprinting in any
state resets to pose 0. Non-keyed bones fall back to a captured rest pose
so empty/partial clips apply fully. Ceiling Y-offset is folded into the
controller's single mesh-offset writer.
PlayerCharacterController gains IsIdle / IsSprinting / IsOnCeiling /
AnimatorOverridden accessors and SetPoseLocalYOffset; SetAnimatorRunning is
guarded while a pose owns the Animator. Removed obsolete Paintman.controller.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PlayerCharacterController:
- Wall lean now moves only the visual model + its paint collider (auto-resolved
mesh root parenting both renderer and bones), not the CharacterController
capsule, so the mesh can sink into the wall (wallMaxInset) as well as lean out
(wallMaxOffset); capsule stays flush.
- Lean eases back to the authored pose when leaving the wall instead of snapping.
- Sprint multiplier now also applies while wall/ceiling climbing.
- Separate wallMantleSpeedMultiplier for pulling up over the top edge,
independent of the climb speed.
Assets:
- Re-exported paintman_UV.FBX and added Paintman.blend: rescaled armature to
mesh, merged seam duplicate vertices, fresh automatic weights, inner-thigh
weight fix (no webbing on leg spread).
- Updated anims, animator controller, font SDF and scene.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add player position/rotation/wall-climb persistence and camera
orbit (yaw/pitch/radius) persistence, auto-saved on quit/play-stop
and auto-loaded on start. Also includes the wall-climb fixes
(directional top-out, base detach on push-away).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the CPU island-mask dilation guard on the GPU backend with a
coverage pass rendered through the same brush rasterizer, so sub-pixel
rim texels that the GPU brush can never reach fall into the gutter and
stay paintable (no more frozen loaded pixels at island edges).
Also includes user content: additional brush masks (dirt) with an
expanded mask selector in the HUD prefab, and CharacterController /
wall-climb inspector tuning.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add mask selector with previews to the brush card (data-driven from
painter.brushMasks); persist activeBrushIndex with HUD layout.
- Fix alpha/coverage artifacts when overpainting after load or backend
switch: derive the dilation source marker from a deterministic UV island
mask instead of resetting it to "unpainted" on every seed.
- Import the two final brush mask textures (Brushes/).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>