All Questions

Community

L
Mathieu01

Error in the Arrow script

In all projects (Indie and Pro) at the Arrow script, the line:

onready var head: Line2D = $Head

should be replaced by:

onready var head: Sprite = $Head

Godot didn't detect that until 3.2.2.

  • Nathan Lovato replied

    Thanks! A pity the type checker didn't pick that up before. It's because for a long time in the project, the head of the arrow was actually a Line2D node.

    I'll add an errata note on the lesson where this is first introduced.

  • Nathan Lovato replied

    Ah I saw this only happens in the Godot projects and the code shown in the video appears to be correct. I'll fix that right away!

  • L
    Mathieu01 replied

    The same error happens in the CameraAnchorDetector script.