Skip to content
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

Add player movement code #70

Merged
merged 31 commits into from
Jul 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a9a4d22
Move player spawning to game
janhohenheim Jul 8, 2024
eef00af
Add movement mod
janhohenheim Jul 8, 2024
9e6ef2a
Merge remote-tracking branch 'origin/main' into player-movement
janhohenheim Jul 8, 2024
f4bdddc
Add velocity
janhohenheim Jul 8, 2024
7dec08e
Use Bevy example code
janhohenheim Jul 8, 2024
5d652eb
Split stuff into files
janhohenheim Jul 8, 2024
d87c8d9
Add component hook, make translation full transform
janhohenheim Jul 8, 2024
54e79f7
Run cargo fmt
janhohenheim Jul 8, 2024
3433c36
Run stable cargo fmt
janhohenheim Jul 8, 2024
22b9802
Merge branch 'main' into player-movement
janhohenheim Jul 8, 2024
a97fea8
Remove whitespace
janhohenheim Jul 8, 2024
adf3708
Give hint for alternative hierarchy
janhohenheim Jul 8, 2024
ffb0e52
Improve hint
janhohenheim Jul 8, 2024
cd4934f
Split spawning into files
janhohenheim Jul 8, 2024
cbb6409
Add disclaimer
janhohenheim Jul 8, 2024
a1e6d25
Add alternatives
janhohenheim Jul 8, 2024
13ecc73
Merge branch 'main' into player-movement
janhohenheim Jul 8, 2024
7945346
Remove authority
janhohenheim Jul 8, 2024
bfd64af
Reorder plugins
janhohenheim Jul 8, 2024
d1b5de8
Improve phrasing
janhohenheim Jul 8, 2024
9c83090
Simplify code
janhohenheim Jul 8, 2024
a7f89b5
Fix faulty interpolation
janhohenheim Jul 8, 2024
e7be801
Add docs
janhohenheim Jul 8, 2024
a4c1565
Remove unnecessary expliciteness
janhohenheim Jul 8, 2024
d2d568a
Make ducky more glorious
janhohenheim Jul 8, 2024
7ae0325
Scope input to player entity
janhohenheim Jul 8, 2024
a03954d
Merge branch 'main' into player-movement
janhohenheim Jul 8, 2024
4899d2f
Fix duplicate on_add logic
janhohenheim Jul 8, 2024
9176856
Fix missing system set
janhohenheim Jul 8, 2024
88a15dd
Fix order
janhohenheim Jul 8, 2024
7db0c67
Run cargo fmt
janhohenheim Jul 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add disclaimer
Co-authored-by: MiniaczQ <xnetroidpl@gmail.com>
janhohenheim and MiniaczQ authored Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit cbb6409d169053c36823d9ed5ef5c92fafe869d5
1 change: 1 addition & 0 deletions src/game/movement.rs
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ fn handle_input(keyboard_input: Res<ButtonInput<KeyCode>>, mut query: Query<&mut
/// Since Bevy's default 2D camera setup is scaled such that
/// one unit is one pixel, you can think of this as
/// "How many pixels per second should the player move?"
janhohenheim marked this conversation as resolved.
Show resolved Hide resolved
/// Note that physics engines may use different unit/pixel ratios.
const SPEED: f32 = 210.0;
for mut velocity in query.iter_mut() {
velocity.0 = Vec3::ZERO;