So this kinda works, however if you cross a specific angle (every 360 deg) the velocity is really high since the difference between the last rotation vector and new one is so big.
Any idea how to fix that, approach it in a better way?
@export var camera : Camera3D
var cam_vel = Vector3(0, 0, 0)
func _process(_delta: float) -> void:
camera_velocity(camera.global_rotation_degrees)
func camera_velocity(last_rotation: Vector3):
await get_tree().create_timer(0.1).timeout
cam_vel = camera.global_rotation_degrees - last_rotation