My sprite is a cube-ish jelly that bounces using Physics2 behaviour. And as we all know, a ball won’t bounce forever, so the duration between each impact after the jelly bounces will decrease as it comes to a halt.
That causes a problem as a splat sound plays each time it collides with the floor because it will eventually impact the floor like 3 times a second which sounds horrible.
How can I change the volume of the sound to lower as the jelly comes to a halt?
Something like the Y speed of the jelly or the bounce height?
Any help appreciated UwU. Ty
find out what is the max velocity of your ball, then set volume to 100/max velocity*velocity
…Honestly don’t know why the reply needs to be 20 characters long
How will I find the max velocity because it only gives the velocity of an object?
put your ball on the highest possible drop location.
check collusion with ground triggered once and set a text to ToString(Ball.Physics2::LinearVelocityY())
Okay, so I just set the max velocity to something random like 500 at first and then worked my way up to 1000. That worked
just fine for me.
I also used variables 1 to 3 for three random sounds and used a “Random integer in range 1 to 3” to randomly change choose sounds on impact as well as a random integer in range for the pitch.
Ty for your help!