Browse Source

公式取消绝对值_HJJ

蓝色星空 1 year ago
parent
commit
47bd4db531
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Assets/Script/GongShi2.cs

+ 2 - 2
Assets/Script/GongShi2.cs

@@ -84,9 +84,9 @@ public class GongShi2 : MonoBehaviour
         WebPosObj.transform.parent = parent;
         WebPosObj2.transform.parent = parent;
         List<Vector2> lvlist = new List<Vector2>();
-        Vector2 p1 = new Vector2(Mathf.Abs(WebPosObj.transform.localPosition.x / sceneLength * tw  ), Mathf.Abs(th-((WebPosObj.transform.localPosition.z) / sceneWidth * th  )));
+        Vector2 p1 = new Vector2(WebPosObj.transform.localPosition.x / sceneLength * tw  , th-((WebPosObj.transform.localPosition.z) / sceneWidth * th  ));
         lvlist.Add(p1);
-        Vector2 p2 = new Vector2(Mathf.Abs(WebPosObj2.transform.localPosition.x / sceneLength * tw ), Mathf.Abs(th-((WebPosObj2.transform.localPosition.z )/ sceneWidth * th  )));
+        Vector2 p2 = new Vector2(WebPosObj2.transform.localPosition.x / sceneLength * tw , th-((WebPosObj2.transform.localPosition.z )/ sceneWidth * th  ));
         lvlist.Add(p2);
         Debug.Log("Web¶ËPos  :" + p1);
         Debug.Log("Web¶ËPos 2 :" + p2);