Delay or toggle "Simulation Generates Hit Event"?

Hey all,

So I’ve got a physics object blueprint and I want to play an impact sound when the object hits something in the world. So I selected the object itself and under the collision rollout I checked the “Simulation Generates Hit Event” box. Then I play a sound at location on Event Hit.

This works fine however, when I first pick up the object, it hits the counter when I grab it and plays the impact sound. I don’t want this to happen so I was wondering if there’s a way that I can control the “Simulation Generates Hit Event” bool through the blueprint itself? IE I want to be able to turn it on only AFTER the object has been picked up. Is this possible?

Insyead of hit, you can do event begin overlap. Change the collision type to overlal all dynamic. Then, there is a node called is overlapping actors whicj can check if your character is Currently overlapping it or not. You can use that to repeatedly play the sound

Thanks for the suggestion ViceVersa but I don’t see how this will make it any better. In fact it would likely make things worse. Interaction with the character isn’t my issue, its the fact that these objects are on counter tops and when I pick them up, they bump the counter. I was intending the impact sound to only play when dropped. If I used overlap then they would be constantly playing a sound as they lie on the counter which isn’t a good setup.

After a good night’s sleep I came back to the problem and was able to figure out an answer. Here’s the solution for anyone who’d like to do something similar:

Create a bool called “Impact Enabled?”
After the Event Hit, use a branch to check if “Impact Enabled?” is true or false. If False, do nothing, if True, continue to a Do Once node. Connect the Do Once node to the Play Sound at Location node and hook the Hit Location into the Location for the sound node. Make the audio a variable (if you want to swap it later) and then create two custom event nodes; “EnableImpact” and “DisableImpact”. On Enable Impact, set the status of the “Impact Enabled?” bool to true, on the “DisableImpact” event, set the bool to False. Finally route the end of the Enable Impact event into the reset value on your “Do Once” node otherwise it will only ever play the sound on the first impact and never again on any future impacts.

On your player character, call the Enable Impact and Disable Impact events where appropriate. In my case, I Disable Impact immediately after a line trace, BEFORE adding a physics handle to the object. This prevents the sound from playing when I first pick the object up. Then once the physics handle has been added, I call the Enable Impact event so it will play the sound when it is dropped.