fixed scene change bug

This commit is contained in:
Leon Palluch 2020-02-02 12:46:54 +01:00
parent 93857b958c
commit a24b5058b2
2 changed files with 3 additions and 4 deletions

View File

@ -88,6 +88,9 @@ func _switch_to_fighting(torso):
_fighting_scene.add_child(torso)
torso.on_ingame()
_body_count = 0
_bodies.clear()
func _switch_to_body_build():
_switch_scene(_body_build_scene, "body_build")

View File

@ -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: