Skip to content

feat(fp): walk round to the driver's door, open it and climb in - #17

Merged
KunalSiyag merged 1 commit into
mainfrom
fp/car-doors
Oct 21, 2026
Merged

KunalSiyag merged 1 commit into
mainfrom
fp/car-doors

Conversation

@KunalSiyag

Copy link
Copy Markdown
Owner

What

Getting into a car is animated now (user feedback: there was no car entry animation; F dropped the hero straight into the seat).

  • The climb in (scripts/fp/drive/car_entry.gd, flag car_doors, on by default). F by a car: the hero walks round it to the driver's door (the shorter clear way round its front or rear, past other cars, jogging while far), reaches for the handle (door_try), pulls the door open and swings it wide, steps into the opening, sits down onto the sill (sit_down, its root travel walked back so the feet stay planted), swings round into the seat and the door slams. From the reach on, a camera beside the door frames it and blends into the chase camera. F on the way to the door turns back.
  • The climb out. F while driving (under 8.5 m/s) brakes the car to a stop, then the door opens, the hero swings out onto the sill, stands up (stand_up), steps clear and the door shuts; walking input and the hero's own camera come back.
  • Fallbacks. With no room for the door or no clear way round the car (or with the flag off), F gets in and out at once, as before.
  • Opening doors (scripts/fp/traffic/car_doors.gd). Each car model's driver's door is cut out of its body between the shut lines the generator draws (triangles crossing a line are split there, so a shut door shows no seam) and hung on its hinge. render.gd swings it on the full model; TrafficFeature.door_info / set_door hand it to the drive feature. All 17 car models in traffic get a door.
  • Hero rig (hero_rig.gd): travel / root_travel (how far a clip carries its root, so the body follows the clip without root motion), stop_gesture, and sit_down / stand_up played 1.5x faster. FpPlayer.ride clears the walk's lean.
  • Sound: new bus signal car_door; the audio feature plays the latch letting go and the slam at the door (car_door_open, car_door_close, synthesized by tools/audio/synth_fp_sfx.py, 2 small WAVs).

Docs: docs/fp/ARCHITECTURE.md (traffic, audio and driving rows), docs/fp/S0-foundation.md (bus signal), docs/fp/slices/I-audio.md, README controls, regenerated docs/api/.

Tests

  • fp_car_doors_test (new): the door cut for every car model (lines round the seat, handle, triangle count, hinge posing), the climb in from the far side (phases in order, keeps off the body, door opens wide and shuts, car_door open then slam, seated hips on the seat), the climb out (stands beside the door on free ground, input and camera back), braking to a stop first, turning back on the way, a blocked door and the flag off.
  • fp_audio_test: the door sounds.
  • fp_drive_test: keeps the instant way in and out (flag off).

Local checks (all PASS):

  • GRIDFALL_OFFLINE=1 GATE_RETRIES=1 tools/gate.sh full: 36/36 steps (parse, every unit test, orbit and first-person smokes), no retries.
  • pre-commit run --all-files and python tools/checks/run_all.py (gdlint, gdformat, complexity, dead code, duplicates, boundaries, flags, API docs).
  • tools/gate.sh render --only fp_photo: the new car_door shot shows the hero on the sill with the driver's door wide open.

F by a car no longer drops the hero straight into the seat. With the
car_doors flag (on by default) the hero walks round the car to the
driver's door, taking the shorter clear way round its front or rear
and jogging while it is far. It reaches for the handle (door_try),
pulls the door open and swings it wide, steps into the opening, sits
down onto the sill (sit_down, its root travel walked back so the feet
stay planted), swings round into the seat and the door slams. F while
driving brakes the car to a stop and plays the climb the other way:
the door opens, the hero swings out onto the sill, stands up
(stand_up), steps clear and the door shuts. From the reach on, a
camera beside the door frames the climb and blends into the chase
camera. F on the way to the door turns back. With no room for the door
or no clear way round, F gets in and out at once as before.

traffic/car_doors.gd cuts each car model's driver's door out of its
body between the shut lines the generator draws, splitting the
triangles that cross them, and hangs it on its hinge; render.gd swings
it on the full model and door_info / set_door hand it to the drive
feature. drive/car_entry.gd runs the walk, the reach, the door, the
sit and the swing. hero_rig.gd gains travel / root_travel (how far a
clip carries its root), stop_gesture, and sit_down / stand_up played
1.5x faster.

GameBus gains car_door. The audio feature plays the latch letting go
and the slam at the door, synthesized by tools/audio/synth_fp_sfx.py
(2 small WAVs).

fp_car_doors_test (new) covers the door cut for every car model, the
climb in from the far side, the climb out, braking to a stop first,
turning back on the way, a blocked door and the flag off;
fp_audio_test covers the door sounds; fp_drive_test keeps the instant
way in and out. A photo shot holds the climb with the door wide open.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Automated review

No new findings on the 32 changed files (gdlint, complexity, TODO policy, dead code).

Run python3 tools/checks/run_all.py locally for the full set of checks.

@KunalSiyag
KunalSiyag merged commit ed25d50 into main Oct 21, 2026
8 checks passed
@KunalSiyag
KunalSiyag deleted the fp/car-doors branch October 21, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant