- Edited
Hello it is me again, I am working through the official Godot tutorial "Your first 2D game".
https://docs.godotengine.org/en/3.5/getting_started/first_2d_game/03.coding_the_player.html
I am having more success so far in comparison to the previous attempts but I have 3 questions.
I interpreted these instructions as writing it out below the extends area 2D.
As can be seen the code is acting funny. I am wondering what identifier I should use to fix this or if I am going in the wrong direction. Also the control elements of this code are different from what is written down. (see below)
I was unable to change that situation for what ever reason. Would this cause problems?
My last question involves this paragraph. "We start by setting the velocity to (0, 0) - by default, the player should not be moving. Then we check each input and add/subtract from the velocity to obtain a total direction. For example, if you hold right and down at the same time, the resulting velocity vector will be (1, 1). In this case, since we're adding a horizontal and a vertical movement, the player would move faster diagonally than if it just moved horizontally."
I interpreted that instruction as coding in func _velocity(0,0).
Is this correct or should I delete this code?
Thank you for aiding me on this coding journey.