Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/kbve/isometric/src-tauri/src/game/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod terrain;
pub mod tilemap;
pub mod trees;
pub mod water;
pub mod weather;

use bevy::app::{PluginGroup, PluginGroupBuilder};

Expand All @@ -30,6 +31,7 @@ use terrain::TerrainPlugin;
use tilemap::TilemapPlugin;
use trees::TreesPlugin;
use water::WaterPlugin;
use weather::WeatherPlugin;

/// All game-logic plugins bundled together.
/// Used by both desktop (main.rs) and WASM (lib.rs) entry points.
Expand All @@ -48,6 +50,7 @@ impl PluginGroup for GamePluginGroup {
.add(TreesPlugin)
.add(WaterPlugin)
.add(InventoryPlugin)
.add(WeatherPlugin)
.add(ActionsPlugin)
}
}
4 changes: 2 additions & 2 deletions apps/kbve/isometric/src-tauri/src/game/scene_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ fn raycast_hover_detection_desktop(
bevy::camera::ScalingMode::FixedVertical { viewport_height } => viewport_height,
_ => return,
};
let half_h = viewport_height / 2.0;
let half_h = (viewport_height / 2.0) * ortho.scale;
let aspect = window.width() / window.height();
let half_w = half_h * aspect;

Expand Down Expand Up @@ -361,7 +361,7 @@ fn raycast_hover_detection_wasm(
bevy::camera::ScalingMode::FixedVertical { viewport_height } => viewport_height,
_ => return,
};
let half_h = viewport_height / 2.0;
let half_h = (viewport_height / 2.0) * ortho.scale;
let aspect = window.width() / window.height();
let half_w = half_h * aspect;

Expand Down
Loading