fix: Limits minimum automatic scale
This commit is contained in:
@@ -68,6 +68,7 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
else
|
else
|
||||||
Scale = b.Width * _camera.pixelHeight / _camera.pixelWidth;
|
Scale = b.Width * _camera.pixelHeight / _camera.pixelWidth;
|
||||||
Scale *= 0.6f;
|
Scale *= 0.6f;
|
||||||
|
if (Scale < 0.01f) Scale = 0.01f;
|
||||||
transform.localPosition = new PointF(b.X + b.Width / 2, b.Y + b.Height / 2).ToVector2();
|
transform.localPosition = new PointF(b.X + b.Width / 2, b.Y + b.Height / 2).ToVector2();
|
||||||
UpdateTransform();
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user