mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-01 07:39:35 +01:00
Tar hensyn til zoom-nivå når brettet blir flyttet med musen
This commit is contained in:
parent
9d914ad748
commit
5b8bd647df
@ -160,8 +160,8 @@ public class GameLauncher extends ApplicationAdapter implements InputProcessor {
|
|||||||
Vector2 diff = newTouch.cpy().sub(lastTouch);
|
Vector2 diff = newTouch.cpy().sub(lastTouch);
|
||||||
lastTouch = newTouch;
|
lastTouch = newTouch;
|
||||||
int[] positionChange = translateCoordinateAccountingForCameraRotation(diff.x, diff.y);
|
int[] positionChange = translateCoordinateAccountingForCameraRotation(diff.x, diff.y);
|
||||||
cameraX = positionChange[0];
|
cameraX = (int)(positionChange[0] * cameraZoom);
|
||||||
cameraY = positionChange[1];
|
cameraY = (int)(positionChange[1] * cameraZoom);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user