Log inGet started
Package

CityLife.component

Newest version

README.md

CityLife

The moving parts of Banana City. The game.city.district sceneModule attaches it to the district root and spawns everything it drives under unique names:

  • city_splash_N: splash rings that pop on the road, sidewalks and plaza near the camera.
  • city_car_N: hover cars on valley lanes, in a ring round Bananasaka Tower, and in two lanes high over the market street.
  • city_holo_dance, city_holo_dance2, city_holo_koi: holograms that sway, bob and glitch-flicker.
  • city_search_N: searchlights sweeping the smog at the tower's foot.
  • city_drone_N: patrol drones flying up and down the market street, banking into their turns with spinning rotors, nav lights and a strobe. The police drone (city_drone_4) swaps the strobe for red and blue beacons and sweeps a searchlight (city_drone_4_spot) over the road.
  • city_flicker_N: facade neon tubes (with their _light) that stutter, sometimes go dark for a while, then stutter back on. A dead glass tube stays behind each one, so an "off" tube still reads.
  • city_blink_N: the road works' amber barrier lamps, blinking in alternation.

The steam vents (city_steam_N) are effects that run on their own.

Nothing it moves carries a collider, so nothing can drag the player. It needs no sibling components. Fields: carSpeed, splashRadius, cameraGuard. The rain itself is city_rainfall, a shader that falls around whichever camera draws it, so it needs no script.

Camera guard

The shoulder camera (third_person_follow) sweeps for walls outward from its shoulder pivot, so on a sidewalk with a facade on the camera's side the 0.75 m shoulder offset would put the pivot, and the camera, inside the building. While cameraGuard is on, CityLife casts from the followed body's head toward the camera's shoulder each frame and narrows shoulderOffset.x to the clear room on that side (less the camera radius), snapping in at once and easing back out at 2.5 m/s when the wall falls away. It reads the authored offset off the rig the first time it sees it, and adopts any value written by someone else since.