Sound on falling objects hit floor only

Hi all,

here is my problem : I have a few objects that are shaking (like books on their shelves) and then falling on the floor.

I want to play a hit sound when they hit the floor. But the sound plays as soon as they start shaking, because they touch each other, or the wall, or the shelf.

How can I play a hit sound when they touch the floor only?
Any help would be greatly appreciated.

many thanks

1 Like

You could make a trigger volume on the floor and when a book enters it the sound plays.

Hi guys, thank you for the tips.

The trigger sound the easiest, I will try that first. But I need to make sure that it does not play “that” sound when something else touch it (other stuff are falling apart from the books, so different sounds each time).
The check solution is out of my league at the moment, I have no idea how to do that.

thanks

Hi,

I managed to make it work with a trigger volume, thank you.

The issue now is that it keep playing the sound for the same objects, already on the floor, each time it moves (the floor is actually shaking).

How can I make my mesh to play the sound once for the initial impact, but not the the following impacts of the same mesh? (knowing that I cannot disable the sound or the trigger all together because there may be other mesh that require that impact sound).

Hope it is clear :slight_smile:

Thank you in advance

In your chain of nodes (before you play the sound) place a “DoOnce” node. This will trigger your sound or chain of events only once. It is independant to your other instances, so if you place more bookshelves, the instances too will just play it once :).

I hope I could help.

Cheers!

Hi,

thakn you for the help.

Unfortunately, with my setting, it does play the sound only once. (see screenshot).
I guest if I link each mesh to it’s own event, it would work. But that’s a lot of time (here you see only a portion of of the meshes).
Is there a way to tweak my setting ? Or am I just wrong and I need to assign 1 chain of node for each mesh?

Thank you in advance

It will get pretty difficult with your setup. As you said, it would require multiple chains and I can see that this is not optimal at all.

Do you have physics enabled for the objects in the bookshelf and the bookshelf itself?

Or what are your settings exactly? Maybe I can create a single blueprint, which does all that stuff for you, when you drag and drop it into the engine. That would work on every level too :).

I honestly think you will run into more problems along the road with your setup.

Cheers

Hi,

yes I guess so. Yes I have physics enabled.

the easiest would be to associate a sound to the mesh (like destructible mesh).

But when I tried that, it also was playing the sound over and over again when it was touching stuff that was not important (in my eyes, like other books or the shelf itself).

Basically I have books on a shelf. The room shake and the books fall down (using physics). But I want the sound of impact to be played only once, and only when it his the floor. And that for most of the books.

Thank you for your help

So, I made a mini tutorial for you. I faced a lot of problems, especially when these nasty books jumped over the collision box, entered again and triggered the sound multiple times (similar to your problem). Now I have a solution. The blueprint will basicly ignore instances, which already were played.

Cheers!

1 Like

Hey kirahirasai ,

thank you fr the time and effort, it looks great.

But is it possible to create this in the level blueprint? Because I cannot create the OnActorBeginOverlap_Event the same way you did in the Level Blueprint, so I cannot make it work.

Thank you again

Hello again

By fiddling around with my other method, I came to no solution, because the options I used weren’t available in the level blueprint. I did take a different approach, without creating too much of a hassle to you. You don’t even need to plug all your static meshes into a node.

This is what you should do:

  1. Click on one of your books/objects to be affected or select all your objects, you want to be affected.
  2. In the sidebar click on “Details”.
  3. Go under the “Actor tab” shown below in the image and click the “+” sign on the “Tags” section. This will add an actor tag. Type your term, which you want to use for your objects. I chose “FallingObjects”.

  1. Follow the level blueprint event graph shown below. Keep in mind that the tag you wrote into the actor tag section should be used in the “Actor has tag” node :).

Hope I could help you again :).

Cheers!

Hi,

fantastic! But I cannot find the right Remove Index Node. The one I find does not connect the same was to the On Actor begin Overlap Node (using Array). That the last thing holding me. It does work but as before repeat the sound over and over.

Many Thanks in advance,

Hello

I think I know, what problem you have. To get my Remove index node, you first need to click on the blue pin on the “OnActorbeginoverlap” node, then drag it out so the context box appears and type in “Get tags”. This will spawn the “Target -> tags” node. After this, you click on the purple pin/array and drag it out from the “Target -> tags” node. You will have the context box appear again and then type in “Remove index”. This will give you the right type node. After that just plug your play output pin into your new created “Remove index” pin.

Edit: Make sure to tick “Context sensitive”, when the context box appears :).

Cheers!

awesome! You are a king!

I will try that tonight and let you know how it goes.
many thanks for your help :smiley:

No problem.

Hope it works flawlessly, when you try it out.

Cheers!

It seems to be working just fine.

thank you again for your help