diff --git a/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab b/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab index d89359e..5528d01 100644 --- a/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab +++ b/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab @@ -1758,6 +1758,10 @@ PrefabInstance: propertyPath: m_Name value: CanvasJsonData objectReference: {fileID: 0} + - target: {fileID: 6036491612173940071, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} + propertyPath: m_TagString + value: GUIData + objectReference: {fileID: 0} - target: {fileID: 6036491612173940088, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: m_Color.b value: 0 diff --git a/Assets/SharedSpatialAnchors/Prefabs/Resources/TalkingAvatar.prefab b/Assets/SharedSpatialAnchors/Prefabs/Resources/TalkingAvatar.prefab index f99ae4d..3ecd6a0 100644 --- a/Assets/SharedSpatialAnchors/Prefabs/Resources/TalkingAvatar.prefab +++ b/Assets/SharedSpatialAnchors/Prefabs/Resources/TalkingAvatar.prefab @@ -962,7 +962,7 @@ Transform: m_GameObject: {fileID: 3128949758138181256} m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} m_LocalPosition: {x: 1.42, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1, y: 1.3, z: 1.3} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 5280034911807405635} diff --git a/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab b/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab index 4f7a5d7..f4293ea 100644 --- a/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab +++ b/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab @@ -14,7 +14,7 @@ GameObject: - component: {fileID: 5204658000653702064} m_Layer: 0 m_Name: wind_turbine_0001_rotor - m_TagString: Untagged + m_TagString: WindTurbine m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -96,6 +96,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fd8e0fba131aaac4caffc43785275be1, type: 3} m_Name: m_EditorClassIdentifier: + speed: 0 --- !u!1 &382264866490105690 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/SharedSpatialAnchors/Scripts/API.cs b/Assets/SharedSpatialAnchors/Scripts/API.cs index 25ce3df..34272ba 100644 --- a/Assets/SharedSpatialAnchors/Scripts/API.cs +++ b/Assets/SharedSpatialAnchors/Scripts/API.cs @@ -45,7 +45,7 @@ public class API : MonoBehaviour public TextMeshProUGUI windSpeedValue; private float LatestT; private float latestWD; - private float latestWS; + public float latestWS; private String windDirectionInDirectionTerms; private string unit; private GameObject webSocketController; diff --git a/Assets/SharedSpatialAnchors/Scripts/SharedAnchorControlPanel.cs b/Assets/SharedSpatialAnchors/Scripts/SharedAnchorControlPanel.cs index 61558e5..2f961db 100644 --- a/Assets/SharedSpatialAnchors/Scripts/SharedAnchorControlPanel.cs +++ b/Assets/SharedSpatialAnchors/Scripts/SharedAnchorControlPanel.cs @@ -384,7 +384,7 @@ public class SharedAnchorControlPanel : MonoBehaviour //photonGrabbableGui.TransferOwnershipToLocalPlayer(); - var networkedAvatar = PhotonPun.PhotonNetwork.Instantiate(TwinTurbine_talkingAvatar.name, new Vector3(1f, -0.2f, 1.15f), Quaternion.identity); + var networkedAvatar = PhotonPun.PhotonNetwork.Instantiate(TwinTurbine_talkingAvatar.name, new Vector3(1f, -0.2f, 1.15f), Quaternion.Euler(Vector3.up * 120)); var photonGrabbableAvatar = networkedAvatar.GetComponent<PhotonGrabbableObject>(); } } diff --git a/Assets/Wind_Turbine/Scripts/Windturbine.cs b/Assets/Wind_Turbine/Scripts/Windturbine.cs index 6d98bdf..77345d2 100644 --- a/Assets/Wind_Turbine/Scripts/Windturbine.cs +++ b/Assets/Wind_Turbine/Scripts/Windturbine.cs @@ -5,19 +5,23 @@ using UnityEngine; public class Windturbine : MonoBehaviour { float angle; - float speed; - + public float speed; + private API apiScript; + private GameObject GUIdataGameObject; // Start is called before the first frame update void Start() { angle = Random.Range(0.0f, 120.0f); speed = Random.Range(75.0f, 86.0f); + GUIdataGameObject = GameObject.FindGameObjectWithTag("GUIData"); + apiScript = GUIdataGameObject.GetComponent<API>(); } // Update is called once per frame void Update() { + Debug.Log("WIND SPEED FROM API SCRIPT:" + apiScript.latestWS); transform.localEulerAngles = new Vector3(0.0f, 0.0f, angle); - angle += Time.deltaTime * speed; + angle += Time.deltaTime * (apiScript.latestWS*10); } } diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 602fe2a..440f9a8 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -5,6 +5,8 @@ TagManager: serializedVersion: 2 tags: - WebController + - WindTurbine + - GUIData layers: - Default - TransparentFX