-
Notifications
You must be signed in to change notification settings - Fork 120
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
Update the dependencies to bevy
0.13 and bevy_egui
0.25
#463
Conversation
After reviewing the Bevy PR #10702, it seems like
Encountered issues while updating
Both are failed, |
@TimJentzsch, I'd appreciate your guidance around what to do with |
It seems that the usage of logical key bindings has undergone a breaking change, and now using Consider the following example: let input_map = InputMap::new([
(RunAction::Forward, Key::Character(SmolStr(Repr::Static("W")))),
(RunAction::Backward, Key::Character(SmolStr(Repr::Static("S")))),
(RunAction::Left, Key::Character(SmolStr(Repr::Static("A")))),
(RunAction::Right, Key::Character(SmolStr(Repr::Static("D")))),
]); While this setup functions normally on a US keyboard, it poses challenges for players using different layouts. For instance, French players might require bindings for the "ZQSD" keys, and Kyrgyz players might need bindings for the "Цфыв" keys. |
If we still require logical key bindings, we should find a way to translate a logical |
Yeah, my feeling is that we're going to need to drop support for |
Used a temporary solution, sending a placeholder like 'Mocking' as a logical key, fixed the compilation erros and passed all tests |
Maybe I found a way to re-implement the logical key bindings, but it seems really breaking and ugly: For example:
This change is kind of a mess and could easily lead to some unintended chaos. Definitely needs a makeover. |
This is really terrible after the test. The situation is:
|
Therefore, we have to pay for it and fix `cannot move` everywhere
I think it's safe to remove, to my understanding the new As for logical keybindings: I think it makes sense that they are a string now. |
Most functionality of new logical key bindings system has been completed, but only one problem: ActionState::just_released(Key) will be reported in the next frame when reporting ActionState::pressed(Key) even we are holding it |
Note that the new |
FYI, plan for tomorrow is to cut a release off of main for Bevy 0.12, and then come to this PR, do a final review pass, and then cut a second release for 0.13 :) |
With [dependencies]
bevy = { version = "0.13.0", default-features = false }
[dependencies.leafwing-input-manager]
git = "https://github.com/Shute052/leafwing-input-manager"
rev = "2b069dd"
default-features = false I get
Minimal repro: https://github.com/Seldom-SE/testetst/tree/bebb52cbfc4d5cddad7bffe36a24eef38919126c |
The issue was identified in the configuration, where bevy specifies: #[cfg(feature = "bevy_asset")]
pub mod asset {
//! Functions for loading and storing assets and resources for Apps.
pub use bevy_asset::*;
} And in your configuration, the default features have been disabled and the The problem can also be reproduced with the latest main branch or even after merging PR #421 (which addresses a bug related to the absence of the |
Another solution could be to make the |
We should do that, and feature gate it. |
Oh, great idea with the table! |
Perhaps we could splitting the version table and the |
Yep, I'd be happy with that. If you do, add a changelog entry and bump the version to 0.12.1 please. |
Status
The contents of this complex PR have been split into PRs #465, #466, and #470.
Objective
Update the dependencies to
bevy
0.13 andbevy_egui
0.25 (unreleased).Solution
Updates for
bevy
0.13 (passed all tests) andbevy_egui
0.25 (passed all tests).bevy_egui
now has an PR #236 to update tobevy
0.13.Unfortuanly, it is not yet updated to the new released bevy.
To address this, I temporarily use my forked version from the PR repo, fixing the problem.
TODO
bevy_egui
0.25Relevant PRs
Input
→ButtonInput
- Bevy PR #11692:KeyCode
→PhysicalKey
Migration Guide
KeyCode
-based logical keybindings andScanCode
-based physical keybindings are no longer supported; please migrate to:KeyCode
is now representing physical keybindings.InputKind::KeyLocation
have been removed; please useInputKind::PhysicalKey
instead.ScanCode
andQwertyScanCode
have been removed; please useKeyCode
instead:KeyCode::Key<Letter>
, e.g.,ScanCode::K
is nowKeyCode::KeyK
.KeyCode::Digit<Number>
, e.g.,ScanCode::Key1
is nowKeyCode::Digit1
.KeyCode::Arrow<Direction>
, e.g.,ScanCode::Up
is nowKeyCode::ArrowUp
.Internal Changes
Input
has been renamed toButtonInput
.assert!
withassert_eq!
.axislike.rs
.examples/twin_stick_controller.rs
Ray3d::intersect_plane()
now take aPlane2d
rather than aVec3
as the normal of the plane after the merge of Bevy PR #10856add_state
has been renamed toinit_state
after the merge of Bevy PR #11043