diff --git a/src/activities/house/mod.rs b/src/activities/house/mod.rs index a8f3184..72fe2cc 100644 --- a/src/activities/house/mod.rs +++ b/src/activities/house/mod.rs @@ -3,7 +3,7 @@ mod grid; mod player; mod room; -use comfy::{random_i32, EngineContext}; +use comfy::{main_camera_mut, random_i32, vec2, EngineContext}; use grid::Grid; use log::error; use player::Player; @@ -62,6 +62,9 @@ pub fn draw(state: &crate::State, _ctx: &comfy::EngineContext<'_>) { } pub fn update(state: &mut crate::State, ctx: &mut comfy::EngineContext<'_>) { + let mut camera = main_camera_mut(); + camera.center = vec2(0.0, 0.0); + let house = state.house_mut(ctx); let current_room = house.rooms.get(house.current_room_id).unwrap(); house.player.update(¤t_room.grid);