Repository navigation
feat(fp): get in and drive cars - #10
Merged
Merged
Conversation
F (gamepad Y) by a stopped or parked car takes it over: traffic swaps it for a player-role car of the same model that the AI no longer steps, and its resident's trip ends. An arcade bicycle model drives it (throttle, brake and reverse, speed-scaled steering, grip by surface, handbrake slide), with a sweep-checked chase camera, a driver view on V, a speedometer and gear chip, and crashes that bounce off collision boxes. The hero sits in the driver's seat. AI cars and walkers yield to player cars as oriented boxes. F again gets out beside the door when slow and there is room; a car left behind is removed once it is out of range and out of sight. Behind the "drive" feature flag, with fp_drive_test. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 27 changed files (gdlint, complexity, TODO policy, dead code). Run |
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Summary
You can now get into a car and drive it, GTA style. Press F (gamepad Y) next to a stopped or parked car and the hero gets in and sits in the driver's seat.
player-role car of the same model, which the AI no longer steps. If the car belonged to a resident, that resident's trip ends.scripts/fp/drive/drive_model.gd): an arcade bicycle model.CollisionWorldin substeps and bounces off buildings and props (crash()).driveinscripts/fp/drive/, behind thedriveflag.GameBus.drive_changedsignal.vehicle_enter,drive_throttleanddrive_brake; only the[input]section ofproject.godotchanged.FpPlayer.ride().enter_target,claim_car,drive_car,leave_car,driven_idandseat_offset.Area
Testing
tools/gate.sh quickpassestools/gate.sh fullpasses (gameplay or rendering changes)pre-commit run --all-filespasses (on the changed files)tools/tests/New
fp_drive_test:drive_changed.fp_core_testnow counts 11 registered features.I checked it in windowed captures at 1280x720. I got into a parked car (the chip showed "Get in the car"), saw the hero seated through the rear glass, drove at 34-48 km/h in the chase view, and checked the turn, the driver view and getting out at the door. The captures turned up two bugs, both fixed in this PR:
Known asset limitation: in driver view, some v2 car models show a flat white inner door panel on the left. The driver camera sits a little toward the middle of the car so the panel covers less of the view.
Checklist
feat(fp): ...,fix(sim): ...)data/feature_flags.json, or not needed (drive)