Invalid call. Nonexistent function 'set_rotd' in base 'RayCast2D'.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By geminigore

if (Input.is_action_pressed(“ui_left”)):
motion += Vector2(-1 , 0)

:bust_in_silhouette: Reply From: exuin

The error means that RayCast2D doesn’t have the function “set_rotd”. If you check the docs you can see that it doesn’t have it. If you’re trying to set rotation in degrees, it’s rotation_degrees and not rotd.