This fist map is using in big Mac Com with a bigger size. and second Map is display in normal computer . So why my way point is shifted and didnt display in correct order in normal computer, Below is my script. Some1 please help me check it up Please. THx
//mouseclick to add waypoints
if (Helicopter_Script.flightState == 0) { if (Input.GetMouseButtonDown(0)) { position = Input.mousePosition; if (position != prevMousePosition) { prevMousePosition = position; //Debug.Log("MouseClicked: mousePosition (x) - "+position.x + ", (y) - "+position.y); if ((position.x>=20 && position.x<=570) && (position.y>=150 && position.y<=780)) { if (helicopter.GetComponent( "Helicopter_Script" ).wayPoints.length == 0) GameObject.Find("Home").renderer.enabled = true; if (helicopter.GetComponent( "Helicopter_Script" ).wayPoints.length < maxWaypoints) { points1.push(position); linePoints = new Vector2 [points1.length + 1]; points1.ToBuiltin(Vector2).CopyTo(linePoints,0); linePoints[linePoints.length-1] = points1[0]; if (line1 != null) Vector.DestroyLine(line1); line1 = new VectorLine("Line1", linePoints , Color.red, null, 2.0, LineType.Continuous); Vector.DrawLine(line1); mapPosition.z = (position.y - 150) * (3300.656 + 1327.897) / (780 - 150) + (-1327.897); mapPosition.x = (position.x - 20) * (824.0381 + 3285.686) / (570 - 20) + (-3285.686); object = "p"+(helicopter.GetComponent( "Helicopter_Script" ).wayPoints.length+1); GameObject.Find(object).transform.localPosition.x = mapPosition.x; GameObject.Find(object).transform.localPosition.z = mapPosition.z; GameObject.Find(object).renderer.enabled = true; Helicopter_Script.wayPoints.Push(mapPosition); Helicopter_Script.isNewWayPoint = true; Debug.Log("numWaypont - "+Helicopter_Script.wayPoints.length +", mapPosition - "+mapPosition); } } } } } //draw lines to waypoints // pathPoints[pathIndex] = thisTransform.position; // pathLine.maxDrawIndex = pathIndex-1; // Vector.DrawLine (pathLine); // Vector.SetTextureScale (pathLine, 1.0);