diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 23:12:30 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 23:12:30 -0700 |
| commit | 245d8eb77d7b92a50a48d4b953e5a8e0d789307c (patch) | |
| tree | 79712ed26db2c79e1abf053eda7823abe75da59d /src/sim | |
| parent | 820e4d00837376bc63b614a382809469a719ed0b (diff) | |
fix shimmering
Diffstat (limited to 'src/sim')
| -rw-r--r-- | src/sim/sim_manager/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/sim_manager/utils.rs b/src/sim/sim_manager/utils.rs index 264597d..c8c28d6 100644 --- a/src/sim/sim_manager/utils.rs +++ b/src/sim/sim_manager/utils.rs @@ -18,7 +18,7 @@ fn write_entity_to_world(sim: &mut SimManager, entity_id: EntityId) -> Vec<(u8, && let Some(cells) = &entity.data.cells && let Some((pos, (cos, sin))) = entity.data._transform(&sim.rb_manager) { - let (half_size_x, half_size_y) = (cells.size.x as f32 / 2.0, cells.size.y as f32 / 2.0); + let (half_size_x, half_size_y) = ((cells.size.x / 2) as f32, (cells.size.y / 2) as f32); // half-extent of the rotated grid's axis-aligned bounding box, plus a cell of margin let (radius_x, radius_y) = ( half_size_x * (cos.abs() + sin.abs()) + 1.0, |
