aboutsummaryrefslogtreecommitdiff
path: root/light-client/src/render/sprite.rs
diff options
context:
space:
mode:
Diffstat (limited to 'light-client/src/render/sprite.rs')
-rw-r--r--light-client/src/render/sprite.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/light-client/src/render/sprite.rs b/light-client/src/render/sprite.rs
index 13ede525..c19f8392 100644
--- a/light-client/src/render/sprite.rs
+++ b/light-client/src/render/sprite.rs
@@ -10,13 +10,13 @@ pub struct Sprite {
impl Sprite {
pub fn new(src: Rect, anchor: Vec2, elevation: f32) -> Self {
let relative_dst = FRect::new(
- -anchor.x - (src.w as f32) / 32. / 2.,
- -anchor.y - (src.h as f32) / 24.,
+ anchor.x - (src.w as f32) / 32. / 2.,
+ anchor.y - (src.h as f32) / 24.,
(src.w as f32) / 32.,
(src.h as f32) / 24.,
);
Self {
- z_offset: -relative_dst.h + anchor.y - elevation,
+ z_offset: elevation,
src,
relative_dst,
}