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.

0 votes

Hello!

I've seen a few answers and videos regarding the creation and implementation of footsteps using Wwise in the Unreal. I've been trying to get this done for 2 weeks now with no success. I'm new to Unreal and Wwise and have a feeling I'm making some basic mistakes that I'm unable to pick out.

I've got my footsteps setup in Wwise as follows:

1. I've created a switch container labeled 'Footsteps" in the Actor - Mixer Hierarchy with its associated Random Containers labeled 'Concrete' and 'Water'.

2. I've then created an event - 'Play_Footsteps'

https://postimg.org/image/dekoyoy1r/

3. In the Game Sync tab, under Switches I've created a switch group labeled 'Materials' with the associated switches, Concrete & Water, nested under it. https://postimg.org/image/qppyvut3x/

4. Under the 'Audio' tab in Wwise, I've made sure that the 'Materials' group in selected in the Switch section and have 'Water' selected as the 'Default Switch/State' https://postimg.org/image/ueqgoumfj/

To get this to work in Unreal 4, I've added the 'Play_Footsteps" event.

The Play_Footsteps event has then been assigned a soundbank within Unreal. I've then gone on to add a Box Trigger and in the Blueprint created for the Trigger, I've connected OnActorBeginOverlap to the Set Switch function with the Switch Group in is assigned to 'Materials' and the 'Switch State' assigned to 'Concrete'. I've also assigned an AKEvent to the running animation and pointed this event to the Play_Footsteps event in Unreal.

When I save, compile and try to run the game, only the sound of the default switch state comes through.

I'll be thankful if one of you could help me out with this. I hope I've provided enough information.

Thanks in advance.

Amit.  

in General Discussion by Amit B. (180 points)

2 Answers

0 votes
Hey Amit!

 

Couple of things to double check.  Within the switch container, did you assign the random containers to the correct switch?

 

https://www.audiokinetic.com/images/2016.1.1_5823/?source=WwiseProjectAdventure&id=image15.png

 

If that is well and firing, are you calling Set Switch within Unreal on the correct actor?  In the profiler what are you seeing when you overlap with the trigger?  If the switches are set correctly and the switch is being called on correct actor, then send me a screen shot of your blueprint in Unreal and I'll see if I can help find out why it's not working :)

 

- Kevin
by Kevin N. (150 points)
Hi Kevin,

Thanks a lot. My current switch setup within Wwise is as follows: https://postimg.org/image/wi4jv6xa3/

I've got the Set Switch function setup within the blueprint for the box collider. OnActorBeginOverlap is connected to the Set Switch function and the group and state have been assigned as they appear in Wwise. So, I'm assuming that the event should be triggered once the Third Person Character and its associated capsule overlap the box trigger? I've also got two errors that Unreal throws up in the log https://postimg.org/image/izq5yl3aj/
I've pulled up the Profiler but I can't really make much sense of what it says on the console! :(  From what I can tell, the Play_Footsteps event is being triggered and plays the default sound. But the problem is, when the character overlaps the box collider, the 'concrete' sounds aren't being played. Here's a screenshot of the Wwise profiler https://postimg.org/image/g246e31az/
Thanks for offering to help out. I really appreciate it :)

Amit.

EDIT: The Wwise Profiler shows that the switch isn't being triggered in the game. As I've already stated in my original post, a box trigger was created and placed in the environment and an associated Blueprint, as show in the post, was added.
No problem!

I believe the output log is telling you that the trigger you placed has "Simulate physics" turned on, but the collision you have set will not work with it.  To fix that, go to your trigger volume and scroll down to "Physics". Within that, you should see "Simulate Physics".  If that is checked on, try checking it off.

Also, just want to make sure that the switch is being set on the correct actor... your blueprint containing the trigger volume looks like this right?

https://postimg.org/image/mh4abw56j/

- Kevin
Hi Kevin,

I've done everything you've mentioned here and still haven't had any luck! :( My blueprint was setup exactly like in the image you've posted, and was on the trigger volume.
I have none the less got it working using the method Rob's posted below. I'd imagine that triggering the sound would be a matter of using a simple blueprint like the one you've posted above.

Thanks,

Amit.
Hmm. I'd probably have to look at it to see what was wrong then.  The way Rob mentioned is definitely better, but there may come another time where you'd like to hook up a switch off of a trigger, so it'd be nice to get it working for ya!

One last thing I would take a look at, are the collision settings on the trigger volume.  If you click the trigger and go to collision presets, make sure that Collision Enabled is set to "Query Only (No Physics Collision), and under collision responses, "Pawn" is set to "Overlap"

If that doesn't work, then I'd probably have to take a look at it to fix it.  Hope this helps!

- Kevin
Hi Kevin,

Here's a screen shot of the Collision Settings https://postimg.org/image/9d6wukzz1/ Things seem to be the way you've mentioned they should be.

EDIT: If by "..hook up a switch off trigger.." you mean playing a sound when, say for example, the character hits the wall, this is what I've got working https://postimg.org/image/c5xvd6kl5/
So every time the character runs into the wall, I get essentially what is a 'one shot' sound to play. I doubt this is the right way to do it, but a little tinkering around got this running.
0 votes
Hi Amit!,

https://www.audiokinetic.com/qa/2449/switching-footstep-sounds-depending-surface-types-blueprints?show=2449#q2449

^ Here is a post directly relating to what you want to do! It is a lot more efficient too because you don't have to make a trigger box each time you want to switch the foot step sounds. If you want it directly related to boxes.

 

https://www.audiokinetic.com/qa/1035/ue4-walking-trouble?show=1035#q1035

 

^There is one that I asked years ago. See the problem you're doing is that you aren't setting an actor in the set switch. So what is going on is that you're essentially setting the switch of nothing. Lets say you have 2 lights with switches, on and off. You have to tell each light specifically to be on or off. You have have light 1 be on and light 2 be off, both of them on etc. So when you overlap you have to cast to your character to change the sounds. Hope this helps!

-Rob
by Robert M. (4.6k points)
Hi Rob,

Thanks for pointing me to those posts. I've been through the first one a few times over the last week. Unfortunately, I don't fully understand it since I've just started out with Wwise and Unreal. Also, I'd like to do it the harder way of placing box triggers in the environment just so I know how the whole system works.
I have a feeling I'm making a mistake on the Blue Print side of things. I currently have OnActorBeginOverlap connected to the Set Switch function within a Blue Print created for the Box Collider that has been setup in the environment (not on the third person character). I assume this is the right thing to do. If I do get completely frustrated with this approach, I'll fall back to the one you've used. In any case I plan to learn the appraoch you've adopted as well. Always better to know a few ways to do the same thing :) Thanks a lot for your help

Amit.
You're Welcome,

Fair enough, I did the same thing when learning.

Kevin is right about the physics. That may fix your problem. If not try using an begin overlap directly used from your box.

http://imgur.com/a/OCCwh


I also forgot I made a tutorial on exactly this:
https://www.youtube.com/watch?v=4ZmqrOSXo5Y&index=12&list=PLXcN8H6bykzFm3CUmAELdXm0Xhhv-Onxp

^ this goes through step by step in wwise and UE4. If you have troubles after setting the physics as well as that tutorial message us back.
The only thing about the tutorial I made awhile back, is that it is done via level BP but you can easily change it to a regular BP
Hi Rob,

Thanks a lot for that! It was really helpful and I've got the footsteps working. Somehow, I've missed it or haven't got to that tutorial yet. I've been looking at a few over the last week or so. the thing is, I have absolutely no experience with Unreal or Wwise and I figured the best way to learn was to actually use both the tools as part of the game development process. I've volunteered to do the sound for a small game developed in Unreal and figured I'd achieve the implementation through Wwise. You'll definitely hear more from me I suspect! Thanks again for the assistance :)

Amit.
Not a problem! I'll be glad to help.
Thank you! :)
...