Dummy ship, single input, and motion integrator

The ship, such as it is, exists and moves when the player presses "W".

Position is updated according to velocity, and the mesh transform is
updated to match the position.
This commit is contained in:
2024-11-26 13:21:05 -06:00
commit b43a57e0d5
5 changed files with 124 additions and 0 deletions

12
src/config.rs Normal file
View File

@@ -0,0 +1,12 @@
/*
Global constants used all over the program. Rather than leaving them scattered
where ever they happen to be needed, I'm concentrating them here.
*/
use bevy::color::Color;
pub(crate) const BACKGROUND_COLOR: Color = Color::srgb(0.3, 0.3, 0.3);
pub(crate) const PLAYER_SHIP_COLOR: Color = Color::srgb(1.0, 1.0, 1.0);
pub(crate) const SHIP_THRUST_LIMIT: f32 = 10.0;
pub(crate) const SHIP_ROTATION_LIMIT: f32 = 5.0; // +/- rotation speed in... uunniittss