diff --git a/src/movement.rs b/src/movement.rs index a26c0e6..c04c84b 100644 --- a/src/movement.rs +++ b/src/movement.rs @@ -147,10 +147,9 @@ mod input_tests { test_utils::update(&mut app, 3); let velocity = app.world.get::(player_entity).unwrap(); assert_eq!(velocity.linvel.floor(), - (Vec2::new(0.7, 0.7).normalize() * 100.).floor()); + (Vec2::new(0.7, 0.7).normalize() * 70.).floor()); } - fn setup() -> (App, Entity) { let mut app = App::new(); app diff --git a/src/physics_bundle.rs b/src/physics_bundle.rs index d0bbf3c..bd33632 100644 --- a/src/physics_bundle.rs +++ b/src/physics_bundle.rs @@ -43,7 +43,7 @@ impl From<&EntityInstance> for ObjectPhysicsBundle { collider: Collider::cuboid(16., 16.), rigid_body: RigidBody::Fixed, sensor: Sensor, - events: ActiveEvents::COLLISION_EVENTS + events: ActiveEvents::COLLISION_EVENTS, }, _ => ObjectPhysicsBundle::default(), } diff --git a/src/test_utils.rs b/src/test_utils.rs index 4cb90da..fff136e 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -43,6 +43,7 @@ pub fn connect_test_gamepad(app: &mut App) { GamepadConnection::Connected( GamepadInfo { name: "test_gamepad".to_string() } ))); + app.update(); }