How to implement camera controls using a Gamepad for Android?

Godot Version

4.2.2

Question

I want my game to have gamepad support. Initially, I looked into how to implement it and found something similar to this:

if use_gamepad && !use_mouse && !use_touch:
		xAxis = Input.get_joy_axis(0, joy_axis_0)
		if abs(xAxis) > JOY_DEADZONE:
			if xAxis >0:
				xAxis = (xAxis-JOY_DEADZONE) * JOY_AXIS_RESCALE
			else:
				xAxis = (xAxis+JOY_DEADZONE) * JOY_AXIS_RESCALE
			rotate_object_local(Vector3.UP, -xAxis * delta * JOY_ROTATION_MULTIPLIER)
			
		yAxis = Input.get_joy_axis(0, joy_axis_1)
		if abs(yAxis) > JOY_DEADZONE:
			if yAxis >0:
				yAxis = (yAxis-JOY_DEADZONE) * JOY_AXIS_RESCALE
			else:
				yAxis = (yAxis+JOY_DEADZONE) * JOY_AXIS_RESCALE
			$CameraController.rotate_object_local(Vector3.RIGHT, -yAxis * delta * JOY_ROTATION_MULTIPLIER/2)
			$CameraController.rotation.x = clamp($CameraController.rotation.x, -1.0, 1.0)
			
		look_input = Vector2(Input.get_joy_axis(0, joy_axis_0) * 5, Input.get_joy_axis(0, joy_axis_1) * 5)
		var control_movement = Vector2()

So everything worked perfectly, but when I exported the game to Android and tested it, this part of moving the camera doesn’t work, everything else works (moving, jumping). How do I solve this?

I’m very, VERY new to Godot, so don’t expect much! Oh, and thank you for at least reading this!