mirror of
https://github.com/nothke/quality-control.git
synced 2024-12-22 15:57:28 +00:00
Fixed out of audio range error
This commit is contained in:
parent
10604a0fa9
commit
725c10e541
@ -19,7 +19,8 @@ public class ConveyorBelt : MonoBehaviour
|
|||||||
|
|
||||||
private void Start()
|
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;
|
audioSource.pitch = Random.Range(-0.05f, 0.05f) + speed / 2f;
|
||||||
|
|
||||||
startPosition = rb.position;
|
startPosition = rb.position;
|
||||||
|
Loading…
Reference in New Issue
Block a user