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