Hugo Locurcio 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
..
car_select 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
screenshots 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 2 年 前
town 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
vehicles 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
.gitattribute d9a6635c11 Ported truck town to Godot 3.0 7 年 前
README.md 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
icon.webp 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 年間 前
icon.webp.import 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 年間 前
project.godot 15bcb941de Add moods (times of day) to Truck Town demo 1 ヶ月 前
spedometer.gd bac1e69164 Use static typing in all demos (#1063) 7 ヶ月 前

README.md

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)
  • M, Gamepad D-Pad Down: Change mood (sunrise, day, sunset, night)
  • 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+

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2752

How does it work?

The base vehicle uses a VehicleBody3D node. The trailer truck is tied together using a ConeJointTwist node, and the tow truck is tried together using a chain made of RigidBody3D nodes which are pinned together using PinJoint nodes.

Screenshots

Screenshot