Movement sound adjustments & movement pitch modulation system
This commit is contained in:
@@ -707,8 +707,13 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
kill();
|
||||
}
|
||||
|
||||
if(!headless && type.loopSound != Sounds.none){
|
||||
if(!headless){
|
||||
control.sound.loop(type.loopSound, this, type.loopSoundVolume);
|
||||
if(type.moveSound != Sounds.none){
|
||||
float progress = Mathf.clamp(vel.len() / type.speed);
|
||||
float pitch = Mathf.lerp(type.moveSoundPitchMin, type.moveSoundPitchMax, progress);
|
||||
control.sound.loop(type.moveSound, this, type.moveSoundVolume * progress, pitch);
|
||||
}
|
||||
}
|
||||
|
||||
//check if environment is unsupported
|
||||
|
||||
Reference in New Issue
Block a user