Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

vehicle

The engine’s Vehicle template on Chaos Vehicles: a sports car and an offroad car, with their wheels, the game mode, the player controller and the speed and gear HUD in Rust. It plays with keyboard, gamepad, steering wheel or touch.

rusteal new MyGame --template vehicle

From TP_VehicleAdv, the engine template it is made of.

Playing it

Open the project and press Play: W / right trigger throttle, S / left trigger brake and reverse, A D / left stick steer, Space / left shoulder handbrake, mouse / right stick look around, Tab toggles the camera, Backspace resets the car.

Screenshot: the vehicle template’s sports car on the track. (images/templates/vehicle.png)

Its classes

The Rust classes are in Rust/<crate>/src/; their Blueprint children, under the engine template’s names, are in Content/.

ClassParentFile
VehicleAdvGameModeGameModeBasesrc/game_mode.rs
VehicleAdvOffroadCarVehicleAdvPawnsrc/offroad_car.rs
VehicleAdvOffroadWheelFrontVehicleAdvWheelFrontsrc/offroad_car.rs
VehicleAdvOffroadWheelRearVehicleAdvWheelRearsrc/offroad_car.rs
VehicleAdvPawnWheeledVehiclePawnsrc/pawn.rs
VehicleAdvPlayerControllerPlayerControllersrc/player_controller.rs
VehicleAdvSportsCarVehicleAdvPawnsrc/sports_car.rs
VehicleAdvSportsWheelFrontVehicleAdvWheelFrontsrc/sports_car.rs
VehicleAdvSportsWheelRearVehicleAdvWheelRearsrc/sports_car.rs
VehicleAdvUIUserWidgetsrc/ui.rs
VehicleAdvWheelFrontChaosVehicleWheelsrc/wheels.rs
VehicleAdvWheelRearChaosVehicleWheelsrc/wheels.rs

Variants

Each variant is a project of its own: the template plus the variant, opening on the variant’s level.

offroad

The offroad car on an offroad level, its game mode ready for local split screen players.

rusteal new MyGame --template vehicle --variant offroad

It opens /Game/Variant_OffRoad/Maps/Lvl_Offroad. To play: W / right trigger throttle, S / left trigger brake and reverse, A D / left stick steer, Space / left shoulder handbrake, mouse / right stick look around, Tab toggles the camera, Backspace resets the car.

Screenshot: the vehicle template’s offroad variant in play. (images/templates/vehicle-offroad.png)

Its own classes, next to the template’s, in a module named after it:

ClassParentFile
OffroadGameModeGameModeBasesrc/offroad/game_mode.rs

time-trial

A race track with a start countdown, gates to pass in order, laps and the best lap time.

rusteal new MyGame --template vehicle --variant time-trial

It opens /Game/Variant_TimeTrial/Maps/Lvl_Timetrial. To play: W / right trigger throttle, S / left trigger brake and reverse, A D / left stick steer, Space / left shoulder handbrake, mouse / right stick look around, Tab toggles the camera, Backspace resets the car.

Screenshot: the vehicle template’s time-trial variant in play. (images/templates/vehicle-time-trial.png)

Its own classes, next to the template’s, in a module named after it:

ClassParentFile
TimeTrialGameModeGameModeBasesrc/time_trial/game_mode.rs
TimeTrialPlayerControllerPlayerControllersrc/time_trial/player_controller.rs
TimeTrialTrackGateActorsrc/time_trial/track_gate.rs
TimeTrialUIUserWidgetsrc/time_trial/ui.rs
TimeTrialStartUIUserWidgetsrc/time_trial/ui.rs

Recipes taken from it: Vehicles.