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

@ -47,6 +47,9 @@ func _ready():
finish.add_point(start + finish_left)
# 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.