Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes
I am adding sound directly to an animation, in the animation blueprints. I am trying to only use one play function (which is a switch) to play the walking sounds. When I walk through a field to change the sound it does not work on the sound in the animation. Yet I know that it does change; because I have tested having the sound manually triggered through a button press. This attached video shows off my problem. I tried doing it through RTPCs as well, through the sound in the level blueprint, but even then when I walked through the fields it would not change.

 

https://www.youtube.com/watch?v=CBdI2si4nV4&feature=youtu.be

 

I found a way around it where when you walk through the volume, it will load and unload banks but the problem with that there is lag in the game.
in General Discussion by Robert M. (4.6k points)

1 Answer

0 votes

The problem is that you are setting the switch on a different AkComponent than the one in your animation.

With the Wwise integration, any object that makes sound has an AkComponent (much like the basic Unreal audio engine has AudioComponents). An AkComponent can be attached to any actor, or any component. In your case, two AkComponents are created:

  1. The first AkComponent is attached to the Player Pawn's root component. This AkComponent is created in your level blueprint, and it is used when you press 'F', and when you enter your Trigger Volume. This is why the switch "works" when you press 'F'.
  2. The second AkComponent is created in your animation, and it is attached to the Mesh being animated. If you're curious, you can take a look at the AkEvent AnimNotify Blueprint. In the Content Browser, go to Engine/EngineAnimNotifies, and open AnimNotify_AkEvent (make sure the "Show Engine Content" checkbox is checked in the view options). You can see that we attach the AkComponent to the mesh.

On the Wwise side of things, the AkComponent corresponds to a Wwise Game Object. What this means in your case is that you are not setting the switch on the correct Wwise Game Object, and this explains why your Set Switch node does not seem to work.

To fix this issue, you need to set the switch on the mesh. From the Level Blueprint, you can do something similar to this:

To help debug such issues, the Wwise profiler is very useful. In the Capture Log window, you would have seen that the "Set Switch" and the "Post Event" were being made on different game objects.

Hope this helps!

by Benoit S. (Audiokinetic) (16.0k points)
By the way, thanks for the YouTube video, this made the issue very easy to see!
Benoit thank you so much, worked like a charm. Sorry if I ever annoy you XD
Don't worry about it, I'm always glad to help!
...