void _updateSpeed() { float accel = (freqHold.getAmp() > threshold) ? 0.4f * ratio : 0.0f; /* * float amp = freqHold.getAmp(); * * float accel=0f; * if (amp > threshold * 2) { * accel = 0.6f; * } else if (amp > threshold) { * accel = 0.3f; * } */ //float accel = (amp > threshold) ? 0.5f * ratio : 0.0f; angSpeed += accel * Time.deltaTime; angSpeed -= angSpeed * damping; if (angSpeed < baseAngSpeed) { angSpeed = baseAngSpeed; } speedSum += angSpeed; speedCount++; if (inner) { angSpeed *= speedRatio; } //Debug.Log(angSpeed); }