staggered updates
This commit is contained in:
parent
1c23861ec4
commit
b0d6c600c6
|
@ -126,9 +126,12 @@ pub fn update_physics_actors(
|
|||
time: Res<Time>,
|
||||
mut q_actors: Query<(&mut Actor, &mut Transform)>,
|
||||
) {
|
||||
let d = time.delta_seconds();
|
||||
for (actor, mut transform) in q_actors.iter_mut() {
|
||||
transform.rotate(actor.angular_momentum);
|
||||
transform.translation += actor.v;
|
||||
// TODO: animate only a step based on time between update:
|
||||
//transform.rotate(actor.angular_momentum.slerp(Quat::IDENTITY, d)); // not working
|
||||
transform.translation += d * actor.v;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue