Use vector math
This commit is contained in:
parent
54c1107f19
commit
fe709b6010
|
@ -181,8 +181,7 @@ struct TilemapVXPrivate : public ViewportElement, TileAtlasVX::Reader
|
|||
|
||||
void updatePosition()
|
||||
{
|
||||
dispPos.x = -(offset.x - mapViewp.x * 32) + sceneOffset.x;
|
||||
dispPos.y = -(offset.y - mapViewp.y * 32) + sceneOffset.y;
|
||||
dispPos = -(offset - mapViewp.pos() * 32) + sceneOffset;
|
||||
}
|
||||
|
||||
void updateMapViewport()
|
||||
|
|
Loading…
Reference in New Issue