diff --git a/examples/ecs/iter_combinations.rs b/examples/ecs/iter_combinations.rs index f16af2f52b1a6..7da35d5d27209 100644 --- a/examples/ecs/iter_combinations.rs +++ b/examples/ecs/iter_combinations.rs @@ -175,8 +175,7 @@ fn integrate(mut query: Query<(&mut Acceleration, &mut Transform, &mut LastPos)> // verlet integration // x(t+dt) = 2x(t) - x(t-dt) + a(t)dt^2 + O(dt^4) - let new_pos = - transform.translation + transform.translation - last_pos.0 + acceleration.0 * dt_sq; + let new_pos = transform.translation * 2.0 - last_pos.0 + acceleration.0 * dt_sq; acceleration.0 = Vec3::ZERO; last_pos.0 = transform.translation; transform.translation = new_pos;