No description
This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Nick Guy 940e3fd2c5
All checks were successful
/ build (push) Successful in 45s
Add release action
2024-05-27 17:45:38 +01:00
.forgejo/workflows Add release action 2024-05-27 17:45:38 +01:00
.godot Add release action 2024-05-27 17:45:38 +01:00
.import Initial Commit 2024-05-27 16:34:33 +01:00
car_select Import sample project 2024-05-27 17:36:07 +01:00
screenshots Import sample project 2024-05-27 17:36:07 +01:00
town Import sample project 2024-05-27 17:36:07 +01:00
vehicles Import sample project 2024-05-27 17:36:07 +01:00
.gitattribute Import sample project 2024-05-27 17:36:07 +01:00
default_env.tres Initial Commit 2024-05-27 16:34:33 +01:00
export_presets.cfg Add Godot export presets 2024-05-27 17:22:14 +01:00
icon.png Initial Commit 2024-05-27 16:34:33 +01:00
icon.png.import Updated to Godot 4.2.2 2024-05-27 17:17:14 +01:00
icon.webp Import sample project 2024-05-27 17:36:07 +01:00
icon.webp.import Import sample project 2024-05-27 17:36:07 +01:00
node_3d.tscn Import sample project 2024-05-27 17:36:07 +01:00
project.godot Import sample project 2024-05-27 17:36:07 +01:00
README.md Import sample project 2024-05-27 17:36:07 +01:00
spedometer.gd Import sample project 2024-05-27 17:36:07 +01:00

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, Gamepad X/Square: Brake/reverse
  • Left Arrow, Gamepad Left Stick, Gamepad D-Pad Left: Steer left
  • Right Arrow, Gamepad Left Stick, Gamepad D-Pad Right: 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)

On mobile platforms, the vehicle automatically accelerates. Touch the left and right edges of the screen to steer. Touch the middle of the screen to brake/reverse (this also temporarily stops acceleration).

Language: GDScript

Renderer: Forward+ on desktop, Mobile on mobile

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 node. The trailer truck is tied together using a ConeJointTwist node, and the tow truck is tried together using a chain made of RigidBody nodes which are pinned together using PinJoint nodes.

Screenshots

Screenshot