-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2D movement overview - Click-and-move - use actions #9835
Conversation
Changed it to use actions instead of the event, like in the sample
The C# example should be updated accordingly |
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
I don't know if there is one? I can't see any mono in godot-docs-project-starters and there is no 2d movement starter in the mono demos. |
The example in the code right below: godot-docs/tutorials/2d/2d_movement.rst Lines 255 to 264 in 1508be4
|
ah, I am blind, done! |
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: Raul Santos <[email protected]>
We updated this code snippet 3 months ago in #9427 which is why it doesn't line up with what's in the demo project repository, it wasn't updated there. I need someone to explain to me why one method of getting input is better than the other, or better practice, before this can be merged, because I've just tested the old and new code and both work. |
From the documentation:
|
I don't know why #9197 says the previous InputMapping example didn't work. #9197 says it doesn't work in 4.2.1.stable. I just tested it and it does, using either the passed event variable or the Input global. It also works in 4.3. The other parts of this page also use Actions with get_vector & get_axis in GDScript and C#, so I don't know why only that one was changed? It's also what's still in the start project, which still works. |
Thanks! And congrats on your first merged PR! |
2D movement overview - Click-and-move - use actions
Cherry-picked to 4.3 in #10038. |
Changed the code sample for the
Click-and-move
section of the2D movement overview
page to use Actions instead of the InputEvent, to match the sample.