/// <summary> /// This is an experimental form of gesture detection. It will always attempt to /// detect a gesture while it is running. This would allow a user to constantly /// be inputting various gesture in a more natural way. /// </summary> void UpdateContinual() { state = VRGestureManagerState.Detecting; //Debug.Log("continuous on"); if (Time.time > nextRenderTime) { Vector3 rightHandPoint = playerHand.position; nextRenderTime = Time.time + renderRateLimit / 1000; //myTrail.CapturePoint(rightHandPoint, rightCapturedLine, lengthOfLineRenderer); //IF currentCapturedLine is length greater than renderRateLimit v testRateLimit // 30 / 1000 = every 0.03 seconds // 100 / 1000 = every 0.10 seconds this will have only logged 3 points of data. // 500 / 1000 = every 0.5 second this will always have 16 points of data. int maxLineLength = (int)testRateLimit / (int)renderRateLimit; myTrail.CapturePoint(getLocalizedPoint(rightHandPoint), currentCapturedLine, maxLineLength); } //myTrail.RenderTrail(rightLineRenderer, rightCapturedLine); //On Release //@TODO: fix this magic number 14. if (Time.time > nextTestTime && currentCapturedLine.Count > GameObject.Find("Controller Manager").GetComponent <NewEarthController>().Magic) { Debug.Log("Frames performed: " + currentCapturedLine.Count); nextTestTime = Time.time + testRateLimit / 1000; LineCaught(currentCapturedLine); //currentRenderer.SetVertexCount(currentCapturedLine.Count); //currentRenderer.SetPositions(currentCapturedLine.ToArray()); } }