L10, L11: Fix robot not being moved by move_local_x#1229
Merged
NathanLovato merged 1 commit intoGDQuest:mainfrom Feb 11, 2026
Merged
L10, L11: Fix robot not being moved by move_local_x#1229NathanLovato merged 1 commit intoGDQuest:mainfrom
NathanLovato merged 1 commit intoGDQuest:mainfrom
Conversation
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
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1228
Please check if the PR fulfills these requirements:
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).