Effecting post processing settings through player input with C++
I'll preface this by saying that I am very new to C++ and fairly new to coding in general so I apologize if my code or terminology isn't up to par.
I've got a game at the moment that picks up audio input from a microphone and plays it back through the speakers with a 0.4 second buffer. My question is how can I use C++ to increase a post processing effect (bloom intensity for example) while the player is making noise and then decrease the effect while they aren't?
The function in the .cpp file that actually plays the audio back is as follows:
This all compiles fine and the audio plays back fine, but the post process effects don't actually happen in the game itself.
asked Nov 28 '17 at 06:41 AM in C++ Programming
Alright I finally figured it out, you need to set a variable to carry the post processing data through a struct FPostProcessSettings myVar and then also set it to be able to override. Here's basically what's needed:
You might need to #include "SceneManagement.h" and/or "SceneInterface.h"
With this, you can have a function that sets your variable- in my case, bloom intensity- to one value on an if statement and to another value on your else or another if like so:
Feel free to check the API here for a list of the different values you could control this way!
answered Dec 04 '17 at 12:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here