Experimental VehicleBody3D setup for vehicle simulations
This commit is contained in:
parent
f6680e7028
commit
02d23d2199
11 changed files with 135 additions and 19 deletions
8
scripts/vehicle.gd
Normal file
8
scripts/vehicle.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends VehicleBody3D
|
||||
|
||||
@export var MAX_STEER = 0.5
|
||||
@export var ENGINE_POWER = 300
|
||||
|
||||
func _physics_process(delta):
|
||||
steering = move_toward(steering, Input.get_axis("turn_right", "turn_left") * MAX_STEER, delta * 10)
|
||||
engine_force = Input.get_axis("move_backward", "move_forward") * ENGINE_POWER
|
||||
1
scripts/vehicle.gd.uid
Normal file
1
scripts/vehicle.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://63j50wn1myoi
|
||||
Loading…
Add table
Add a link
Reference in a new issue