Moved the camera out of data.

This commit is contained in:
Relintai 2020-04-26 11:26:42 +02:00
parent b0874ebbb6
commit 77ccce7d74
2 changed files with 1 additions and 1 deletions

View File

@ -581,7 +581,7 @@ func on_c_controlled_changed(val):
_controlled = val _controlled = val
if val: if val:
var cam_scene : PackedScene = ResourceLoader.load("res://data/camera/CameraPivot.tscn") var cam_scene : PackedScene = ResourceLoader.load("res://player/camera/CameraPivot.tscn")
camera_pivot = cam_scene.instance() as Spatial camera_pivot = cam_scene.instance() as Spatial
add_child(camera_pivot) add_child(camera_pivot)
camera = camera_pivot.get_node("Camera") as Camera camera = camera_pivot.get_node("Camera") as Camera