I
Irisss_54

Predefined variables?

Is the variable "position" and "rotation" predefined in Godot? So, we don't need to define them particularly?

as stated in the script:

 position += velocity * delta

 rotation = velocity.angle()


  • Nathan Lovato replied

    Yes, these variables are built into Godot, which is why you don't need to define them yourself. Precisely, they are predefined for 2D nodes such as Sprite.