Godot 4.3.stable
Im trying to use ai to write a script that rotates the camera to my devices rotation but the error said: Line 3:Mixed use of tabs and spaces for indentation.
Line 6:Mixed use of tabs and spaces for indentation.
Line 7:Mixed use of tabs and spaces for indentation.
Line 8:Mixed use of tabs and spaces for indentation.
Line 6:Standalone lambdas cannot be accessed. Consider assigning it to a variable.
Line 9:Expected statement, found “Indent” instead.
Line 9:Mixed use of tabs and spaces for indentation.
Line 10:Expected statement, found “Indent” instead.
Line 10:Mixed use of tabs and spaces for indentation.
Line 11:Expected statement, found “Indent” instead.
Line 12:Expected end of file.
My code is: extends Camera3D
func _ready():
# Enable the gyroscope
Input.set_use_accumulated_gyro(true)
func _process(delta):
if Input.is_action_pressed(“ui_accept”): # Optional: Check if a button is pressed
# Get gyroscope data
var gyro = Input.get_accumulated_gyro()
# Use gyroscope data to set camera rotation
rotation_degrees.x += gyro.x * delta
rotation_degrees.y += gyro.y * delta
rotation_degrees.z += gyro.z * delta