fixed scene change bug
This commit is contained in:
parent
93857b958c
commit
a24b5058b2
@ -87,6 +87,9 @@ func _switch_to_fighting(torso):
|
|||||||
|
|
||||||
_fighting_scene.add_child(torso)
|
_fighting_scene.add_child(torso)
|
||||||
torso.on_ingame()
|
torso.on_ingame()
|
||||||
|
|
||||||
|
_body_count = 0
|
||||||
|
_bodies.clear()
|
||||||
|
|
||||||
|
|
||||||
func _switch_to_body_build():
|
func _switch_to_body_build():
|
||||||
|
@ -10,13 +10,9 @@ var _x_axis = Vector3(1, 0, 0)
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var cam_rot = camera.rotation_degrees
|
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)
|
_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)
|
_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)
|
_look_at_vec = _look_at_vec.rotated(_x_axis, cam_rot.x * PI/180)
|
||||||
print(_look_at_vec)
|
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user