Audio Fixes

Reactor load RTPC wasn't being set correctly
Turns out you actually have to assign audio emitter positions manually, wow
This commit is contained in:
Reinier Vens 2021-03-16 18:17:38 +00:00
commit c0494ee3d8
11 changed files with 107 additions and 61 deletions

View file

@ -92,6 +92,7 @@ public class ShipInstance : EntityInstance
var throttle = 0f;
if (thrusterInstance.System.particleCount > 0)
throttle = (float) thrusterInstance.System.particleCount / thrusterInstance.MaxParticleCount;
AkSoundEngine.SetObjectPosition(thrusterInstance.SfxSource, thrusterInstance.SfxSource.transform);
AkSoundEngine.SetRTPCValue("thruster_throttle", throttle, thrusterInstance.SfxSource);
AkSoundEngine.SetRTPCValue("performance_durability", thrusterInstance.Thruster.Item.DurabilityPerformance, thrusterInstance.SfxSource);
AkSoundEngine.SetRTPCValue("performance_thermal", thrusterInstance.Thruster.Item.ThermalPerformance, thrusterInstance.SfxSource);