You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
298 B
Rust

use bevy::prelude::*;
use crate::components::Velocity;
pub(crate) fn update_movement(mut moving_objects: Query<(&Velocity, &mut Transform)>, time: Res<Time>)
{
for (velocity, mut transform) in moving_objects.iter_mut()
{
transform.translation += velocity.value * time.delta_seconds();
}
}