Hello!
This is a question about the typing behavior and safe line casting (that little number on left side of every single line of any script in godot).
I know isn't needed and code can work anyway without that numbers becoming green, but i really feeling obsessed about it, and i always try to having all clear.
So, can someone tell me how a line like this should be formatted to having a safe line? (In Godot v4.1.1)
Thanks!
Update: I believe i found the solution by using clampf()
@onready var playerbase_spring := $playerbase_mount/playerbase_spring as SpringArm3D
func _process(_delta: float) -> void:
(playerbase_spring as SpringArm3D).rotation.x = clamp((playerbase_spring as SpringArm3D).rotation.x, -PI/4, PI/4)