implement drifting
This commit is contained in:
parent
caa53fdb59
commit
1c23861ec4
|
@ -128,6 +128,7 @@ pub fn update_physics_actors(
|
||||||
) {
|
) {
|
||||||
for (actor, mut transform) in q_actors.iter_mut() {
|
for (actor, mut transform) in q_actors.iter_mut() {
|
||||||
transform.rotate(actor.angular_momentum);
|
transform.rotate(actor.angular_momentum);
|
||||||
|
transform.translation += actor.v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,10 @@ pub fn setup(
|
||||||
|
|
||||||
// Add alien
|
// Add alien
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
actor::Actor::default(),
|
actor::Actor {
|
||||||
|
v: Vec3::new(-0.005, 0.01, 0.015),
|
||||||
|
..default()
|
||||||
|
},
|
||||||
actor::Talker { conv: "Hello World!".to_string() },
|
actor::Talker { conv: "Hello World!".to_string() },
|
||||||
SceneBundle {
|
SceneBundle {
|
||||||
transform: Transform {
|
transform: Transform {
|
||||||
|
|
Loading…
Reference in a new issue