added spedometer
This commit is contained in:
1
car.gd
1
car.gd
@@ -31,6 +31,7 @@ func _ready() -> void:
|
||||
func _physics_process(delta: float) -> void:
|
||||
steer(delta)
|
||||
apply_air_resistance()
|
||||
get_tree().get_first_node_in_group("spedometer").text = str(linear_velocity.length())
|
||||
|
||||
func steer(delta: float) -> void:
|
||||
var steer_input = Input.get_axis("Steer Right", "Steer Left")
|
||||
|
||||
Reference in New Issue
Block a user