3
\$\begingroup\$

I have a ball which roll (like all ball does :) ) ...

My ball can roll on different type of surfaces (2 or 3) and at different velocity.

I don't know how to approach to reproduce in my game the sound effect.

I can assume to do :

  1. Get an Sfx of a rolling ball

  2. Run in loop if my ball is moving

then ?

Well.. i need some help.

Thanks

\$\endgroup\$
3
\$\begingroup\$

I've solved.

If I move up/down the audio.Pitch based on rigidbody.velocity.magnitude, i obtain what i was looking for

Example:

_audio.pitch = rb.velocity.magnitude / AudioSpeedAdjuster;

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.