Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Set Switch (AkComponent) not working (UE4)

0 votes
Hey guys,

I've gone through the numerous posts on this topic already but I don't want to have to work around the issue without sharing it here, having spent about 10 hours on it. I'm trying to play different footstep sounds according to the surface the player is walking on. I followed this tutorial and copied exactly what he's done: https://blog.audiokinetic.com/-unity-3d/. Everything's set up (I'm pretty sure) correctly in both Wwise and Unreal. When I print the Surface Type to String, I see them changing according to the surface I'm walking on. However, the sound that's played is the same. I'm pretty sure I have it set up correctly. Is this a known issue that's being worked on? I've attached a bunch of images for those sceptical: http://pho.to/AfdRn

Thanks.
asked Apr 14, 2017 in General Discussion by Guus v. (150 points)

1 Answer

0 votes

I've been looking at your screenshots for about 15 minutes, and I'm still not sure what's wrong. It's hard without being able to poke through your project. However, I have two ideas you might want to try. 

  1. I notice that your switches have generic names (Material_01 & Material_02). Make sure you set the physical materials in UE4 to those names and not they're intended to be.
  2. Also, you're using Get Player Character instead of Get Player Pawn in your BP. Pawn inherits from character, so it's probably not causing an issue. Might try changing them just in case.

---

I know it's only two little things, but it might give you a lead. I've used this tutorial for footstep switches on three projects, so I'd like to think that I'm used to it now. I still don't see what's wrong with your implementation, and I'm really curious. Please drop a reply if you find a solution or have any updates.

answered Apr 19, 2017 by Ian S. (2,060 points)
Hi Ian,

Thanks for your response. I finally managed to fix it but I still don't understand exactly why. For the AkEvents that I had set up in the animation editor, I also filled out the "Attach Name" variable, at the time not knowing what it did. When I removed that, it started working (see screenshot). Thanks again for your time.

https://ibb.co/hfNCQk
That's strange. I always assumed that if you didn't specify an attach name it would attach the ak component to the root. Not sure why it fixed the problem, but at least I have another bullet in my troubleshooting holster. Thanks for the response!
...