Files
godot-demo-projects/3d/truck_town
LaBodilsen 8464543a23 simplifying steering to a single line with move_toward (#451)
* 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 *
2020-03-25 13:46:42 -04:00
..
2020-03-09 03:54:32 -04:00
2018-02-15 20:31:49 +11:00
2020-03-09 03:54:32 -04:00

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.

Screenshots

Screenshot