implement drifting

This commit is contained in:
yuni 2024-03-19 16:18:52 +01:00
parent caa53fdb59
commit 1c23861ec4
2 changed files with 5 additions and 1 deletions

View file

@ -128,6 +128,7 @@ pub fn update_physics_actors(
) {
for (actor, mut transform) in q_actors.iter_mut() {
transform.rotate(actor.angular_momentum);
transform.translation += actor.v;
}
}

View file

@ -194,7 +194,10 @@ pub fn setup(
// Add alien
commands.spawn((
actor::Actor::default(),
actor::Actor {
v: Vec3::new(-0.005, 0.01, 0.015),
..default()
},
actor::Talker { conv: "Hello World!".to_string() },
SceneBundle {
transform: Transform {