Skip to content

Commit ed1438a

Browse files
committed
Update images updates.
1 parent 06418e2 commit ed1438a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Assets/ReachySimulator/Scripts/ReachyController.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ void Awake()
145145
texture = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false);
146146
headOrientation = new Vector3(0, 0, 0);
147147
baseHeadRot = head.transform.localRotation;
148-
StartCoroutine("UpdateCameraData");
149148
}
150149

151150
void Update()
@@ -176,17 +175,15 @@ void Update()
176175
}
177176

178177
UpdateHeadOrientation();
178+
UpdateCameraData();
179179
UpdateCameraZoom();
180180
}
181181

182-
IEnumerator UpdateCameraData()
183-
{
184-
while (true)
185-
{
186-
yield return new WaitForEndOfFrame();
187-
leftEyeFrame = GetEyeRawTextureData(leftEye);
188-
rightEyeFrame = GetEyeRawTextureData(rightEye);
189-
}
182+
183+
void UpdateCameraData()
184+
{
185+
leftEyeFrame = GetEyeRawTextureData(leftEye);
186+
rightEyeFrame = GetEyeRawTextureData(rightEye);
190187
}
191188

192189
string GetEyeRawTextureData(UnityEngine.Camera camera)

0 commit comments

Comments
 (0)