This commit is contained in:
Joshua Barretto 2019-06-30 23:46:55 +01:00
parent 14d9071670
commit 0de505b74c

View File

@ -141,7 +141,11 @@ impl<'a> System<'a> for Sys {
// Set direction based on velocity
if Vec2::<f32>::from(vel.0).magnitude_squared() > 0.1 {
ori.0 = Lerp::lerp(ori.0, vel.0.normalized() * Vec3::new(1.0, 1.0, 0.0), 10.0 * dt.0);
ori.0 = Lerp::lerp(
ori.0,
vel.0.normalized() * Vec3::new(1.0, 1.0, 0.0),
10.0 * dt.0,
);
}
// Integrate forces