fix: can't use look_at() before node is in tree, use rotation_degrees instead
This commit is contained in:
@@ -98,7 +98,8 @@ func _setup_third_person_camera() -> void:
|
|||||||
_third_person_camera.far = 200.0
|
_third_person_camera.far = 200.0
|
||||||
# Position behind and above the player
|
# Position behind and above the player
|
||||||
_third_person_camera.position = Vector3(0, 2.0, -4.0)
|
_third_person_camera.position = Vector3(0, 2.0, -4.0)
|
||||||
_third_person_camera.look_at(Vector3(0, 1.0, 0))
|
# Set rotation to look at player (can't use look_at before adding to tree)
|
||||||
|
_third_person_camera.rotation_degrees = Vector3(-15, 0, 0)
|
||||||
_player.add_child(_third_person_camera)
|
_player.add_child(_third_person_camera)
|
||||||
_third_person_camera.current = false
|
_third_person_camera.current = false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user