Added better grid to the map and reworked camera positioning whilst map is open
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user