Looks like you're not logged in

Login or Register to continue

Lesson Q&A

Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.

  • Feedback (Positive)apt-barracudaThank you for including a collapsible slide about how the animated runner scene was made, despite it being beyond the scope of the course to learn how to make it. Doing this helps generalists such as myself to get started looking into these topics independently. 1 4 Sep. 11, 2024
  • Bug in the RunnerVisual toolrewarding-chimpanzeeI was fiddeling with the RunnerVisual scene and with the exported values of the state machiene. If you leave the animation_name to anything else than Idle, when compiling scenes you run in to: Cannot call method 'travel' on a null value. at line 102 to 105 in the tool script depending on the state. Adding a little reset of the state at runtime will probably fix it. 1 1 Sep. 25, 2024
  • move_and_slide in top down need extra line for slide correctlyDowarFor `move_and_slide` to work correctly for sliding on diagonal wall you should precise to put in the `_ready` of `runner.gd` script the line `set_motion_mode(MOTION_MODE_FLOATING)` because the default motion mode `MOTION_MODE_GROUNDED` only slide on floor wich cause to only slide the slope in one way due to no gravity or real floor in top down game ^^ 1 1 Sep. 05, 2024
  • Code simplificationPaulFor the section where we added code that changed the runner visual angle and animation type, this was all placed in the statement: `if direction.length() > 0.0:` But I was thinking, we already specified a variable to discern this: `var has_input_direction := direction.length() > 0.0` and created an if/else to handle the movement. So to simplify, all of these additional visual effects we applied in the new `if` statement could all move into the previous `if has_input_direction` statement. But I'd be curious to know if this was deliberate, why in this case we would choose to do it this way? 1 0 Nov. 10, 2024
  • How to make character face camera when he turns from left to right (and vice versa)?aramplWhen switching direction from left to right (and vice versa) the character turns over the back, which feels somehow unpleasant. I tried to overcome this with the next code: ```gdscript ... if direction.y == 0.0: _runner_visual.angle = rotate_toward(_runner_visual.angle, -direction.orthogonal().angle(), 8.0 * -delta) else: _runner_visual.angle = rotate_toward(_runner_visual.angle, direction.orthogonal().angle(), 8.0 * delta) ... ``` Are there more natural, "proper" way to do this? 5 0 Nov. 10, 2024
  • L5.P1 html code in hint 4Bob CornbobIn the fourth hint there is some html looking code `</Hint> <Hint>` 1 0 Nov. 05, 2024
  • Creating a character modelram876Hello! Can you tell me in which direction I should look for information on creating such models as a character in this lesson? I want to read about it. 2 0 Nov. 01, 2024
  • Problem Running L5.P1Cave Darr When I click the "Run" Button to evaluate my solution for this challenge, I get an error before the game begins: @onready var metadata: Metadata = get_window().get_node(Metadata.NAME) Clicking on the error brings me toui_test_panel.gd : Line 31: @onready var metadata: Metadata = get_window().get_node(Metadata.NAME) Line 113: for practice_metadata: PracticeMetadata in metadata.list: 1 0 Oct. 22, 2024
  • Too cute!SebThe runner is not in 3D? Really? I read the code, I read the part about clipping mask (and watched the video). Part of my brain understands, part of it fells for the magic. I love this. 1 0 Oct. 21, 2024
  • Minor visual glitches (due to Y sorting?)alarming-baboonJust to mention, there are some small glitches with the animation (arms or ears disappearing, it's also visible on the first/last video of this chapter). Here, it seems to be caused by the Y sort, because the glitch stops when I uncheck it. Is there a way to exclude some specific sub scenes from the Y sorting, or does it affect the whole subtree no matter what? Great chapter anyway, the animated asset is impressive and really fun. 1 0 Sep. 30, 2024
  • Deceleration handling disappeared from final codealarming-baboonIn the last code reference, the deceleration calculation is not there anymore. Furthermore, even if the code is working as-is (immediate stop), when taking into account deceleration, it still misses a test because even if `direction.length` is zero, with the deceleration, the velocity can still be positive. Without the condition, the animation goes back to `IDLE` immediately and it looks like the character is sliding on ice, which is fun but probably not what was intended. Here is my complete `_physics_process` method for reference: ```gdscript func _physics_process(delta: float) -> void: var direction := Input.get_vector("move_left", "move_right", "move_up", "move_down") var has_input_direction := direction.length_squared() > 0.0 if has_input_direction: var desired_velocity := direction * max_speed var current_speed_percent := velocity.length() / max_speed * 100.0 velocity = velocity.move_toward(desired_velocity, acceleration * delta) _runner_visual.angle = rotate_toward(_runner_visual.angle, direction.orthogonal().angle(), rotation_speed * delta) _runner_visual.animation_name = ( RunnerVisual.Animations.WALK if current_speed_percent < 80.0 else RunnerVisual.Animations.RUN ) else: velocity = velocity.move_toward(Vector2.ZERO, deceleration * delta) if Vector2.ZERO == velocity: _runner_visual.animation_name = RunnerVisual.Animations.IDLE move_and_slide() ``` 2 0 Sep. 30, 2024
  • L5.P1 Smooth_Game - QuestionMoKTHello, so I couldn't solve the practice and I ended up looking at the solution, and the thing I did wrong was trying to specify what I wanted to rotate. I don't understand why we're able to just put "rotation" and not have to specify "smooth_ship.rotation" or "sprite_2d.rotation", like we did in the lesson. (assuming we add smooth_ship as an onready var) It wouldn't work in the script but wouldn't I want to specify the item that I'm accessing it's rotation property for? For example: ```gdscript sprite_2d.rotation = rotate_toward(sprite_2d.rotation, direction.orthogonal().angle(), 8.0 * delta) ``` 3 0 Sep. 29, 2024
  • Adding an Attack Animation to the RunnerVisualDkerzaUpon looking at its node scene, Iā€™m intrigued by the cutout animation implemented this way in Godot. Since this module is still being worked on, may I request for the said game artist to incorporate the attack animation (by also adding a sword or something) into the current RunnerVisual asset so we can analyze/break down how it functions as an extra lesson? Thanks. 1 0 Sep. 29, 2024
  • L5.P1 Smooth Game issuenervous-woodpeckerI'm not sure what I'm doing wrong here that is preventing the challenge from passing for the two rotation related checks. Any help is appreciated! `extends CharacterBody2D` `@onready var sprite_2d: Sprite2D = %Sprite2D` `@onready var collision_shape_2d = %CollisionShape2D` `var max_speed := 800.0` `var acceleration := 500.0` `var deceleration := 500.0` `var rotation_speed := 3.0` `func _physics_process(delta: float) -> void:` ` var direction := Input.get_vector("move_left", "move_right", "move_up", "move_down")` ` var is_moving := direction.length() > 0.0` ` if is_moving:` ` var desired_velocity := direction * max_speed` ` # make sure to make the velocity progress toward the desired state over time` ` velocity = velocity.move_toward(desired_velocity, acceleration * delta)` ` else:` ` # make sure the make the velocity process toward zero over time` ` velocity = velocity.move_toward(Vector2.ZERO, deceleration * delta)` `` ` if direction.length() > 0:` ` # make sure to make the rotation progress towards the desired angle over time` ` var angle = direction.angle()` ` angle = rotate_toward(angle, direction.orthogonal().angle(), rotation_speed * delta)` ` # make sure to use `orthogonal()`!` ` # and don't forget to use `rotation_speed`` ` rotation = direction.angle()` ` move_and_slide()` 3 0 Sep. 24, 2024
  • "move smoothly" broken link to M4jmagrippisHey, great stuff on this one too, working through it and excited for the rest of the modules šŸ™Œ Just a heads-up that there's a broken link near the start, "we made the spaceship [move smoothly]". Instead of the relative path of the internal link you may have typo'd in something weird šŸ™‚ 1 0 Sep. 06, 2024
  • Small remark + "migration" issue from 0.6.0 to 0.7.0iDieHello, It looks to me that these sentences are duplicates (maybe only one was supposed to stay): - An artist may choose to import assets with a higher resolution to allow you to animate camera zoom later on without losing visual quality. - Here, the artist made the character bigger to allow for more detail. The higher resolution allows for effects like zooming in on the character without losing quality. Also, I was working using the files from `l2dfz-0.6.0-win` but I didn't want to lose my changes -> I copied the content of the folder `M09.top_down_movement_workbook` from `l2dfz-0.7.0-win` into my existing folder and I had a strange issue : the scene `runner_visual_red.tscn` was pointing to `character_visual.gd`. This prevented me from having: `@onready var _runner_visual: RunnerVisual = %RunnerVisualRed` I realized it was related to the old "character" files (coming from `l2dfz-0.6.0-win`) and reattached the script `runner_visual.gd` to `runner_visual_red.tscn`. After having a closer look, I noticed that the exact root cause was that `runner_visual_blue.tscn` has the same uid as `character_visual_blue.tscn` (same for `runner_visual_red.tscn` and `character_visual_red.tscn`). Not sure it will impact a lot of people but I prefer to indicate it here. Dai 3 0 Sep. 02, 2024
Site is in BETA!found a bug?