mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
* simplyfied the steering to a single line with lerp Replaced: if steer_target < steer_angle: steer_angle -= STEER_SPEED * delta if steer_target > steer_angle: steer_angle = steer_target elif steer_target > steer_angle: steer_angle += STEER_SPEED * delta if steer_target < steer_angle: steer_angle = steer_target steering = steer_angle with steering = lerp(steering, steer_target, STEER_SPEED) and lowered STEER_SPEED to 0.2 * Update vehicle.gd * added space around *
Truck Town
This is a demo implementing different types of trucks of varying complexity using vehicle physics.
Do not be surprised if everything is bouncy and glitchy, Godot's physics system is not polished and will likely be reworked in the future.
Language: GDScript
Renderer: GLES 2
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.
