Added better grid to the map and reworked camera positioning whilst map is open

This commit is contained in:
=
2026-05-01 19:20:19 +02:00
parent 75818c22d5
commit 8a6de193a1
3 changed files with 55 additions and 40 deletions
-13
View File
@@ -9,7 +9,6 @@ public partial class Camera3d : Camera3D
[Export] public float ScrollStrength = 5.0f;
private bool isShowingMap = false;
private Vector3 previousPosition;
private Vector2 _mouseDelta;
@@ -25,18 +24,6 @@ public partial class Camera3d : Camera3D
{
isShowingMap = !isShowingMap;
canMove = !isShowingMap;
if (isShowingMap)
{
previousPosition = Position;
Position = new Vector3(layerSize * tileWidth / 2 - tileWidth / 2, 90 - visibleLayer * 4, layerSize * tileWidth / 2 - tileWidth / 2);
RotationDegrees = new Vector3(-90, 0, 0);
}
else
{
Position = previousPosition;
RotationDegrees = new Vector3(-75, 0, 0);
}
}
}