Made the player teleport and rotate exactly to starting position when the level is started

This commit is contained in:
KingGurke 2023-10-01 13:27:43 +02:00
parent b98c3fa851
commit 8f9ad6f87c
2 changed files with 4 additions and 1 deletions

View file

@ -7,7 +7,7 @@ extends Control
func _on_player_speed_changed(speed_float:float):
var speed_string = "%.02f" % speed_float
print_debug("changing speed display to ", speed_string)
# print_debug("changing speed display to ", speed_string)
speed.set_text(speed_string)
func _on_level_distance_changed(distance_float):

View file

@ -48,6 +48,9 @@ func _ready():
# print_debug("start: ", start, "start out: ", start_out.normalized(), " finish left: ", start + start_out.normalized().rotated(90) * width/2, "start right: ", start + start_out.normalized().rotated(-90) * width/2)
finish.width = 20
player.position = start
player.rotation = start_out.angle()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):