From a24b5058b2416ae00a040f93fc6979a77e0cca39 Mon Sep 17 00:00:00 2001 From: Leon Palluch Date: Sun, 2 Feb 2020 12:46:54 +0100 Subject: [PATCH] fixed scene change bug --- Controllers/GameStateController.gd | 3 +++ Ingame/CameraFocus.gd | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Controllers/GameStateController.gd b/Controllers/GameStateController.gd index 4b193df..4f84b75 100644 --- a/Controllers/GameStateController.gd +++ b/Controllers/GameStateController.gd @@ -87,6 +87,9 @@ func _switch_to_fighting(torso): _fighting_scene.add_child(torso) torso.on_ingame() + + _body_count = 0 + _bodies.clear() func _switch_to_body_build(): diff --git a/Ingame/CameraFocus.gd b/Ingame/CameraFocus.gd index 4c1bd55..4b9b26a 100644 --- a/Ingame/CameraFocus.gd +++ b/Ingame/CameraFocus.gd @@ -10,13 +10,9 @@ var _x_axis = Vector3(1, 0, 0) func _ready(): var cam_rot = camera.rotation_degrees - print(cam_rot.y) _look_at_vec = _look_at_vec.rotated(Vector3(0, 1, 0), cam_rot.y * PI/180) - print(_look_at_vec) - print(cam_rot.x) _x_axis = _x_axis.rotated(Vector3(0, 1, 0), cam_rot.y * PI/180) _look_at_vec = _look_at_vec.rotated(_x_axis, cam_rot.x * PI/180) - print(_look_at_vec) func _process(delta: float) -> void: