|
|
|
@ -199,7 +199,7 @@ public class LocationSimulator : MonoBehaviour
|
|
|
|
|
{ |
|
|
|
|
while (true) |
|
|
|
|
{ |
|
|
|
|
var url = $"{Config.LocationServer}/le/uwbofferdata/getPositionDataByMapId/12"; |
|
|
|
|
var url = $"{Config.LocationServer}/le/uwbofferdata/getPositionDataByMapId/{Config.MapId}"; |
|
|
|
|
HttpManager.Instance.Get<PositionData>(url, tempData => |
|
|
|
|
{ |
|
|
|
|
if (tempData.errorCode != 1) |
|
|
|
@ -221,7 +221,9 @@ public class LocationSimulator : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
if (agentControllers.ContainsKey(data.targetNo)) |
|
|
|
|
{ |
|
|
|
|
agentControllers[data.targetNo].UpdatePosition(data); |
|
|
|
|
//agentControllers[data.targetNo].UpdatePosition(data); |
|
|
|
|
agentControllers[data.targetNo].enabled = false; |
|
|
|
|
agentControllers[data.targetNo].transform.position = Main.LocationSimulator.ConversionTransform(data); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -312,7 +314,7 @@ public class LocationSimulator : MonoBehaviour
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public Vector3 ConversionTransform(LocationData data) |
|
|
|
|
{ |
|
|
|
|
var pos = new Vector3(-((float)data.xAxis+offsetX), -17.7f, -((float)data.yAxis+offsetZ)); |
|
|
|
|
var pos = new Vector3(-((float)data.xAxis - offsetX), -17.7f, -((float)data.yAxis - offsetZ)); |
|
|
|
|
//pos.y = SetY(pos); |
|
|
|
|
|
|
|
|
|
return pos; |
|
|
|
|