extends Camera3D
var target_rotation = PI / 2 # Ángulo de rotación objetivo (90 grados en radianes)
var current_rotation = 0.0
var rotation_speed = 0.1 # Ajusta esta variable para cambiar la velocidad de rotación
func _process(delta: float) -> void:
if current_rotation < target_rotation:
rotate_y(delta * rotation_speed)
current_rotation += delta * rotation_speed
if current_rotation >= target_rotation:
current_rotation = target_rotation
else:
rotation.y = target_rotation
No hay comentarios:
Publicar un comentario