soooo i couldn’t find any link to feedback/bugreports/etc, just a heads up, in 04-Making-A-Basic-3D-Platformer-v0.4.0/03-Camera-Controls.html
, section “Creating node variables” you claim:
The annotation
@onready
indicates that the variable being defined is aNode
in the scene tree, and the script needs to wait for it to load.
which is factually wrong and might confuse a bunch of people without that prior knowledge, might wanna fix that.
@onready
indicates that the variable assignment has to happen between _init
and _ready
. we have to indicate that due to the node being in the scene tree, but that’s not “what that indicates” (and especially in a beginner course you wanna be suuuuper careful about claims like “@onready
tells it that this is a node”, plenty gdscript newbies already have issues wrapping their head around the Object inheritance vs Scene trees and “optional typing”).
I would instead write something along:
The annotation
@onready
indicates that the variable assignment happens at startup time (directly before_ready()
). You’ll have to do this for anyNode
-related operations, because the scene tree only gets loaded at runtime.
Note also how the “variable being defined” isn’t in the scene tree at all (again, careful when it comes to terminology in a beginner’s tutorial, the variable “is” most definitely both “being declared” and residing “in” the script class, the value you assign to it however is a Node that’s not available at compiletime.)