diff options
-rw-r--r-- | scene/2d/sprite_2d.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp index 5178d2f850..c795ce9cf7 100644 --- a/scene/2d/sprite_2d.cpp +++ b/scene/2d/sprite_2d.cpp @@ -366,6 +366,9 @@ Rect2 Sprite2D::get_rect() const { if (centered) { ofs -= Size2(s) / 2; } + if (Engine::get_singleton()->get_use_pixel_snap()) { + ofs = ofs.floor(); + } if (s == Size2(0, 0)) { s = Size2(1, 1); |