Skip to content

Custom Engine SFX

Indigocoder1 edited this page Oct 23, 2024 · 3 revisions

Custom Engine SFX Manager

The CustomEngineSFXManager takes the place of the normal EngineRpmSFXManager, as found on the Cyclops.
This is done to account for user-made engine looping sfx, which the normal sfx manager does not support.

Animation Curves

This component offers customizability over volume and pitch of your sound file, relative to the current sub speed.
This customizability takes the place of AnimationCurves, which allow you to define your own functions in Unity by dragging and rotating control points. You can also manually set positions by right clicking on control points.

To use these curves, simple click and drag the control points, or choose from one of the preset values. The recommended pitch max and min values are 1.5 and 0.52 respectively. If you go below or exceed these values the library will log a warning to the console. Example curves are shown below

Volume Over Speed: Example volume over speed curve

Pitch Over Speed: Example pitch over speed curve

The playLoopSFXWhenNotMoving bool allows you to keep having the sfx loop play even when you aren't moving, so you get a nice ambient hum in the background (assuming you have your animation curves set up that way)