mirror of
https://github.com/nothke/quality-control.git
synced 2026-10-11 19:28:55 +00:00
Fixed out of audio range error
This commit is contained in:
1 parent
10604a0fa9
commit
725c10e541
1 file changed
+2
-1
@@ -19,7 +19,8 @@ public class ConveyorBelt : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
audioSource.time += Random.Range(1f, 3f);
|
||||
float length = audioSource.clip.length;
|
||||
audioSource.time += Random.Range(0.2f * length, 0.4f * length);
|
||||
audioSource.pitch = Random.Range(-0.05f, 0.05f) + speed / 2f;
|
||||
|
||||
startPosition = rb.position;
|
||||
|
||||
Reference in new issue
Block a user