added the four players, rule enforcement explosion and fuse sound
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
extends Camera3D
|
||||
|
||||
var target_angle:int
|
||||
var current_angle:int
|
||||
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:
|
||||
target_angle = GLOBALVARS.selected_player * 90
|
||||
'''
|
||||
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.001*(target_angle-current_angle)
|
||||
current_angle += 0.1*(target_angle-current_angle)
|
||||
|
||||
global_rotation_degrees.y = current_angle
|
||||
|
Reference in New Issue
Block a user