Round system

This commit is contained in:
Rendo 2025-11-29 23:46:16 +05:00
commit 3df8247a84
32 changed files with 573 additions and 123 deletions

View file

@ -8,6 +8,7 @@ class_name PlayerCamera
var vertical_compensation : float
var compensation_tween: Tween
var compensate: bool = false
var disable: bool = false
var compensation_speed: float
@export var compensation_time: float = 1.0
@export var compensation_delay: float = 0.5
@ -20,6 +21,7 @@ func _ready() -> void:
current = true
func _process(delta: float) -> void:
if disable: return
if compensate:
if abs(vertical_compensation) <= 0.001:
vertical_compensation = 0
@ -28,7 +30,7 @@ func _process(delta: float) -> void:
rotate_camera(0,compensation_speed * delta)
func _input(event: InputEvent) -> void:
if not is_multiplayer_authority():
if not is_multiplayer_authority() or disable:
return
if event is InputEventMouseMotion:
rotate_camera(-event.relative.x * SENSITIVITY,-event.relative.y * SENSITIVITY)