aboutsummaryrefslogtreecommitdiff
path: root/plugins/movement/src/velocity.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-08 15:23:24 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-08 15:23:24 +0800
commitfc0d77d6838b16d811ffe5e999d3d77d499b470f (patch)
tree00565a452f9045b4fb357ae04a1cae349163839a /plugins/movement/src/velocity.rs
chore: initialize project workspace and movement plugin
Diffstat (limited to 'plugins/movement/src/velocity.rs')
-rw-r--r--plugins/movement/src/velocity.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/movement/src/velocity.rs b/plugins/movement/src/velocity.rs
new file mode 100644
index 0000000..c445e64
--- /dev/null
+++ b/plugins/movement/src/velocity.rs
@@ -0,0 +1,12 @@
+use bevy::{
+ ecs::component::Component,
+ math::Vec3,
+ prelude::{Deref, DerefMut},
+};
+
+/// Used to record the amount of movement an object is currently undergoing
+#[derive(Component, Deref, DerefMut, PartialEq, Default, Clone)]
+pub struct Velocity {
+ #[deref]
+ velocity: Vec3,
+}