Fix TMX Camera Culling (#1501)

This commit is contained in:
Turky Mohammed 2023-12-12 04:42:53 +03:00 committed by GitHub
parent a69f20f889
commit 26024d1eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -146,8 +146,8 @@ void FastTMXLayer::draw(Renderer* renderer, const Mat4& transform, uint32_t flag
rect.origin.x -= _tileSet->_tileSize.x;
rect.origin.y -= _tileSet->_tileSize.y;
rect.size.x += s.x * (zoom / 2) / 2 + _tileSet->_tileSize.x * zoom;
rect.size.y += s.y * (zoom / 2) / 2 + _tileSet->_tileSize.y * zoom;
rect.size.x += s.x * zoom / 2 + _tileSet->_tileSize.x * zoom;
rect.size.y += s.y * zoom / 2 + _tileSet->_tileSize.y * zoom;
Mat4 inv = transform;
inv.inverse();