# Truck Town
This is a demo implementing different types of trucks of
varying complexity using vehicle physics.
Controls:
- Up Arrow, W, Gamepad Right Trigger, Gamepad A/Cross: Accelerate
- Down Arrow, S, Gamepad Left Trigger, Gamepad B/Circle : Brake
- Left Arrow, Gamepad Left Stick: Steer left
- Right Arrow, Gamepad Left Stick: Steer right
- U, Gamepad Select, left-click speedometer: Change speedometer unit (m/s, km/h, mph)
- C, Gamepad Y/Triangle: Change camera (exterior, interior, top-down)
- Escape, Gamepad D-Pad Up: Go back to menu (press again to exit)
Language: GDScript
Renderer: Forward Plus
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/524
## How does it work?
The base vehicle uses a
[`VehicleBody`](https://docs.godotengine.org/en/latest/classes/class_vehiclebody.html)
node. The trailer truck is tied together using a
[`ConeJointTwist`](https://docs.godotengine.org/en/latest/classes/class_conetwistjoint.html)
node, and the tow truck is tried together using a chain made of
[`RigidBody`](https://docs.godotengine.org/en/latest/classes/class_rigidbody.html)
nodes which are pinned together using
[`PinJoint`](https://docs.godotengine.org/en/latest/classes/class_pinjoint.html) nodes.
## Screenshots
![Screenshot](screenshots/truck_town.webp)