Skip to content

L10, L11: Fix robot not being moved by move_local_x#1229

Merged
NathanLovato merged 1 commit intoGDQuest:mainfrom
JuanFdS:fix-move-robot-position-in-l10-and-l11
Feb 11, 2026
Merged

L10, L11: Fix robot not being moved by move_local_x#1229
NathanLovato merged 1 commit intoGDQuest:mainfrom
JuanFdS:fix-move-robot-position-in-l10-and-l11

Conversation

@JuanFdS
Copy link
Copy Markdown
Contributor

@JuanFdS JuanFdS commented Feb 11, 2026

Fixes #1228

Please check if the PR fulfills these requirements:

  • The commit message follows our guidelines.
  • For bug fixes and features:
    • You tested the changes.

Related issue (if applicable): #1228

What kind of change does this PR introduce?
A fix.

Does this PR introduce a breaking change?
No

New feature or change

What is the current behavior?

When running move_local_x the robot doesn't seem to move.

What is the new behavior?

When running move_local_x in the modified scenes of lessons 10 and 11, the robot will move.

Other information

This change is only local to those scenes, if a student tries move_local_x in other scenes/lessons the robot won't move if the scene is set up in the same way as these scenes previously were (Camera2D as child of root node).

Previously, when running move_local_x, the robot didn't seem to move.
This happened because the node that was actually receiving the message
move_local_x was the scene root, which was the parent of both Robot and
Camera0D. This means that the Robot was actually moving but the
Camera2D was moving as well.

The fix is basically the same change in both lessons:
- Moved the scene script from the robot to the scene root (in L11 also
removed the Built-in script from the scene root).
- Made the Camera2D top level inside _ready() so its position will be
independent from the scene root, so when the root is moved by
move_local_x, the Robot moves away while the Camera2D stays in place.

Fixes GDQuest#1228
@NathanLovato
Copy link
Copy Markdown
Contributor

NathanLovato commented Feb 11, 2026

Thank you very much! Making the camera top level is probably the best way to go about it. Just tested it. It's working like a charm.

@NathanLovato NathanLovato merged commit 7b4476f into GDQuest:main Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L10, L11: The move_local_x function has no effect anymore

2 participants