extends Camera3D

# Movement parameters
var jump_distance := 100
var base_speed := 5
var acceleration := 1.5
var max_speed := 2000
var current_speed := base_speed

func _process(delta):
	var input_vector := Vector3.ZERO

	# Jump left/right
	if Input.is_action_just_pressed("ui_left"):
		global_position.x -= jump_distance
	elif Input.is_action_just_pressed("ui_right"):
		global_position.x += jump_distance

	# Continuous movement
	if Input.is_action_pressed("move_left"):
		input_vector.x -= 1
	if Input.is_action_pressed("move_right"):
		input_vector.x += 1

	# Speed boost with Shift
	if Input.is_action_pressed("speed_boost") and input_vector.x != 0:
		current_speed = min(current_speed + acceleration, max_speed)
	else:
		current_speed = base_speed

	# Apply movement
	global_position += input_vector * current_speed * delta
