视角切换&小地图模糊问题解决
This commit is contained in:
1 parent
9bc3864790
commit
e4d4333357
30 files changed
+3746
-2965
No files matched your search
@@ -98,9 +98,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var screenWidth = UnityEngine.Screen.width;
|
||||
var screenHeight = UnityEngine.Screen.height;
|
||||
|
||||
var sw_world = _minicamera.ViewportToWorldPoint(new Vector3(0, 0, 90));
|
||||
var sw_world = _minicamera.ViewportToWorldPoint(new Vector3(0.2f, 0.2f, 180));
|
||||
var sw = _map.WorldToGeoPosition(sw_world);
|
||||
var ne_world = _minicamera.ViewportToWorldPoint(new Vector3(1f, 1f, 90));
|
||||
var ne_world = _minicamera.ViewportToWorldPoint(new Vector3(0.955f, 0.955f, 180));
|
||||
var ne = _map.WorldToGeoPosition(ne_world);
|
||||
|
||||
return new Vector2dBounds(new Vector2d(sw.x, sw.y), new Vector2d(ne.x, ne.y));
|
||||
@@ -120,7 +120,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (mapData != null)
|
||||
{
|
||||
var count = mapData.List.Count;
|
||||
var interval = Math.Max(Math.Ceiling(count / 500D),1f);
|
||||
var interval = Math.Max(Math.Ceiling(count / 100D),1f);
|
||||
for (int i = 0; i < mapData.List.Count; i++)
|
||||
{
|
||||
if(i% interval == 0)
|
||||
@@ -147,16 +147,17 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
_mipMapRoute.transform.parent = transform;
|
||||
var lineRender = _mipMapRoute.AddComponent<LineRenderer>();
|
||||
|
||||
lineRender.material = Instantiate(Resources.Load<Material>("UI/Material/Round10"));
|
||||
lineRender.material = Instantiate(Resources.Load<Material>("UI/Material/1"));
|
||||
var dat = feat.Points[0];
|
||||
lineRender.endColor = Color.white;
|
||||
lineRender.startColor = Color.white;
|
||||
//设置宽度
|
||||
lineRender.startWidth = 8f;
|
||||
lineRender.endWidth = 8f;
|
||||
lineRender.startWidth = 10f;
|
||||
lineRender.endWidth = 10f;
|
||||
lineRender.positionCount = dat.Count;
|
||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||
lineRender.numCornerVertices = 30;
|
||||
lineRender.numCornerVertices = 20;
|
||||
lineRender.numCapVertices = 20;
|
||||
lineRender.loop = false;
|
||||
_mipMapRoute.layer = 9;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user