1
0
This repository has been archived on 2025-06-02. You can view files and clone it, but cannot push or open issues or pull requests.

16 lines
470 B
GDScript

extends Camera3D
var target_angle:float # the position where the camera needs to be
var current_angle:float # the position where the camera currently is
func _physics_process(_delta: float) -> void:
'''
Controls where the camera is pointed based on which player is selected
'''
target_angle = abs(GLOBALVARS.selected_player) * 90
if current_angle != target_angle:
current_angle += 0.1*(target_angle-current_angle)
global_rotation_degrees.y = current_angle