|
@@ -30,7 +30,8 @@ public class PlayerTrigger : MonoBehaviour
|
|
|
|
|
|
|
|
|
private void LateUpdate()
|
|
|
- {
|
|
|
+ {
|
|
|
+
|
|
|
if (API_GSXR_Slam.GSXR_Get_Head() != null)
|
|
|
{
|
|
|
transform.position = new Vector3(API_GSXR_Slam.GSXR_Get_Head().position.x, transform.position.y, API_GSXR_Slam.GSXR_Get_Head().position.z);
|
|
@@ -49,6 +50,31 @@ public class PlayerTrigger : MonoBehaviour
|
|
|
float y = transform.localPosition.z / GameManager.Instance.MapSize.y * GameManager.Instance.WebMapSize.y;
|
|
|
var pos = new Vector3(x, -y, 0);
|
|
|
|
|
|
+ HttpSocket.Instance.SendIpToPointPos(pos, (message) =>
|
|
|
+ {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ */
|
|
|
+ if (OpenXRCamera.Instance.head != null)
|
|
|
+ {
|
|
|
+ transform.position = new Vector3(OpenXRCamera.Instance.head.position.x, transform.position.y, OpenXRCamera.Instance.head.position.z);
|
|
|
+ transform.eulerAngles = new Vector3(0, OpenXRCamera.Instance.head.eulerAngles.y, 0);
|
|
|
+ if (GameManager.Instance.IsRuning)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (Vector3.Distance(m_LastPos, transform.position) < 0.1f)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ m_LastPos = transform.position;
|
|
|
+ float x = transform.localPosition.x / GameManager.Instance.MapSize.x * GameManager.Instance.WebMapSize.x;
|
|
|
+ float y = transform.localPosition.z / GameManager.Instance.MapSize.y * GameManager.Instance.WebMapSize.y;
|
|
|
+ var pos = new Vector3(x, -y, 0);
|
|
|
+
|
|
|
HttpSocket.Instance.SendIpToPointPos(pos, (message) =>
|
|
|
{
|
|
|
|