# Drivecraft Drivecraft is replicated vehicles for Unreal Engine with their own physics: cars, trucks with a semi-trailer and motorbikes that a player drives without waiting for the server, that push and get pushed by other players the same way on every machine, and traffic that drives itself on lanes you draw. Any character gets in and out with one component, without changing its class. It does not use Chaos Vehicles (still Experimental in 5.8) and it does not need Physics Prediction or async physics turned on in your project. ## What is in it | Part | What it does | Page | |---|---|---| | `ADRCVehicle` | A drivable pawn: collision box, a `Visual` root for your meshes, seats, chase camera, engine sound, Enhanced Input | [Getting started](getting-started.html) | | `UDRCVehicleMovementComponent` | The physics (rigid body, raycast suspension, tyres, engine, brakes, damage) and the network code | [Getting started](getting-started.html) | | `FDRCVehicleSetup`, `UDRCVehicleSetupAsset` | Everything that makes a vehicle drive the way it does, in a struct or a Data Asset to share | [Getting started](getting-started.html#tuning) | | Ready-made setups | Sports car, family car, SUV, van, bus, truck, semi-trailer and motorbike, as functions (`Make ... Setup`) and as assets in `Presets` | [Getting started](getting-started.html#tuning) | | Engine and gearbox | Torque curve, gear ratios, rev limiter, automatic or manual, simulated and predicted with the rest | [Getting started](getting-started.html#engine-and-gearbox) | | `UDRCSettings` | Ground surfaces: grip and rolling resistance by physical material (dirt, grass, ice in the example) | [Getting started](getting-started.html#surfaces) | | `UDRCRiderComponent` | Add it to your character: get in as driver or passenger, get out, events on every machine | [Getting in and out](getting-in-and-out.html) | | Trailers | A vehicle hitched to another, simulated and predicted with it | [Trucks and trailers](trailers.html) | | `ADRCTrafficLane`, `ADRCTrafficJunction`, `ADRCTrafficManager` | Traffic on lanes you draw: following, bends, junctions with right of way, stop signs and traffic lights, lane changes, drivers of their own, honking, stopping after a crash | [Traffic](traffic.html) | | `UDRCEngineSoundComponent` | The engine heard from its rpm and load: a recording pitched by the rpm, or a sound made as it plays | [Engine sound](engine-sound.html) | | `DrivecraftExample` module | A town of blocks with traffic, an avenue, traffic lights and every vehicle to drive, in `L_DrivecraftTown` | [The example town](example.html) | For how it behaves on a bad connection and how it was measured, see [Networking](networking.html). ## How it stays in sync Every vehicle in the world runs on one fixed frame, 60 a second, shared by the server and every client (`UDRCVehicleSubsystem`). The server runs all of them together, always in the same order. A player's client sends its input for each frame a little ahead of time; the server holds a few frames of it and runs each frame with the input the player used. The client runs ahead of the server by about the round trip and keeps its state for every frame. When the server's state for a frame does not match, the client goes back to that frame and runs again to now, together with the vehicles it predicts near it (within 30 m, run ahead with their last input). Vehicles further away are drawn a little in the past, between two server frames. The drawn car slides over any correction.