Save Point
README.md
cameraCollision
The hangout's follow-camera pull-in, for small furnished rooms. HangoutHud calls step(dt) every frame after the builtin orbital follow rig has placed the camera at its framing. The rig's own pull-in is switched off at runtime (cameraRadius = 0): in 3-4 m rooms its look-ahead sweeps kept finding walls and furniture, and the over-the-head aim lift (HangoutHud.frameOverHead) moved the sweep's pivot, which the look-ahead read as motion, so the camera kept snapping to the player's head.
What it does:
- sweeps a 0.12 m sphere from the aim point to the framed camera position, past every player's avatar;
- blocks on architecture whatever its size (any collider under a
*shell*or a*door_leaf*: walls, wall ends, the lintel over a doorway, floors, ceilings, doors) and on large furniture (largest extent >=bigLong1.4 m and second >=bigWide0.6 m: sofa back, bed, bookshelf, wardrobe, fridge); triggers, lamps, plants, the coffee table, side tables, desks, chairs, consoles and pads are looked through; - never lets the camera rest inside a looked-through prop: it stops in front of the nearest one that would hold it;
- keeps the aim point under a ceiling when the player stands on furniture;
- comes in at once (never a frame through a wall), holds
hold0.35 s once clear, then eases out overoutTime0.45 s; a gain insidedeadbandis ignored so it does not pump.
API: step(dt), seeThrough(entityId), forget() (drop cached verdicts after furniture changes), enabled (false hands the camera back to the rig's own pull-in, for comparisons), last (ideal/placed distance and blocker of the last frame, for diagnostics). Tunables are fields on the module table.