Repository navigation
feat(fp): walk round to the driver's door, open it and climb in - #17
Merged
Merged
Conversation
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>
Automated reviewNo new findings on the 32 changed files (gdlint, complexity, TODO policy, dead code). Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Getting into a car is animated now (user feedback: there was no car entry animation; F dropped the hero straight into the seat).
scripts/fp/drive/car_entry.gd, flagcar_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.stand_up), steps clear and the door shuts; walking input and the hero's own camera come back.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.gdswings it on the full model;TrafficFeature.door_info/set_doorhand it to the drive feature. All 17 car models in traffic get a door.hero_rig.gd):travel/root_travel(how far a clip carries its root, so the body follows the clip without root motion),stop_gesture, andsit_down/stand_upplayed 1.5x faster.FpPlayer.rideclears the walk's lean.car_door; the audio feature plays the latch letting go and the slam at the door (car_door_open,car_door_close, synthesized bytools/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, regenerateddocs/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_dooropen 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-filesandpython tools/checks/run_all.py(gdlint, gdformat, complexity, dead code, duplicates, boundaries, flags, API docs).tools/gate.sh render --only fp_photo: the newcar_doorshot shows the hero on the sill with the driver's door wide open.