Announcement

Collapse
No announcement yet.

Looking to find where/how to attach collision sounds to static mesh/objects

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Put a breakpoint and/or some print strings in your blueprint so you can see if the overlap/hit events are actually firing off at all. Narrow down where the problem is actually occurring and you will have a much easier time debugging the problem.

    Comment


      #17
      Originally posted by Craft_Media_Group View Post
      First of all, THANK YOU for taking the time to help with this. Unfortunately this is still not working. Would it make a difference if the object (static mesh) has it's own blueprint class? That's what I've been working from. I also made a new blueprint based off the mesh, but do I need to add that blueprint somewhere or attach it to anything? Also, I have clicked (and tried it when unclicked) the ""Simulation Generates Hit Event". Still nothing.
      I don't understand how it can't be working. All you have to do is follow my screenshots . The item can be anything a rock , a trash can (you're case) or a cube (what I done in the example)

      Did you even download my project?? If you did you would see it working exactly as I have done in the screen shots .

      The blueprint is all set up in the content browser. I drag the blueprint into the scene this spawns my object into the world . I can do this as many times as I want let's say I wanted 10 trash cans in my case the cube I just drag the blueprint into the scene 10 times an position them where I want.

      Then hit play . I can run to any of the 10 cubes and no matter which one I hit it will play the sound.

      I could clone the blueprint then just change the mesh from a cube into any static mesh I want . Drop it into the scene and it will still work.

      So I'm confused. If you have followed my blueprints exactly then yours should work.

      Comment


        #18
        Originally posted by EniGmaa View Post
        I don't understand how it can't be working. All you have to do is follow my screenshots . The item can be anything a rock , a trash can (you're case) or a cube (what I done in the example)

        Did you even download my project?? If you did you would see it working exactly as I have done in the screen shots .

        The blueprint is all set up in the content browser. I drag the blueprint into the scene this spawns my object into the world . I can do this as many times as I want let's say I wanted 10 trash cans in my case the cube I just drag the blueprint into the scene 10 times an position them where I want.

        Then hit play . I can run to any of the 10 cubes and no matter which one I hit it will play the sound.

        I could clone the blueprint then just change the mesh from a cube into any static mesh I want . Drop it into the scene and it will still work.

        So I'm confused. If you have followed my blueprints exactly then yours should work.
        TBH, I don't understand why he's trying to do it in the custom socket location in the first place. Just use the point of impact as the location source. Since the point of impact of the golf cart and trash can is would it where the sound would be made.

        But if he had to do it for whatever reason at the socket location, it should be working as intended with the help he's been given.

        Please post the blueprints of what you've implemented OP so we can figure out what's going on.
        Website/Portfolio: http://www.VictorBurgosGames.com

        Join me on stream: https://www.twitch.tv/BurgosGames for UE4 Game Dev. If you need help, just stop by and ask!

        Wishlist Neko Ghost, Jump! a 2D/3D Puzzle-Platformer : https://store.steampowered.com/app/1...ko_Ghost_Jump/

        Comment


          #19
          Originally posted by EniGmaa View Post
          is this what you are trying to do??

          so lets say you have an asset in you're content browser , in you're case its a trash can . you want to make a blueprint attached to the trash can that when you put it into the world and something hits it , then it will play a sound??
          if so mine worked. Here is what i did.

          so just right click the chosen asset in the content browser and go to create blueprint using this actor.

          [ATTACH=CONFIG]54066[/ATTACH]

          Then inside the blueprint events right click and add the onComponent hit event

          [ATTACH=CONFIG]54067[/ATTACH]

          then set it up like this. Drag a reference to the static mesh into the event graph

          [ATTACH=CONFIG]54071[/ATTACH]

          Then drag a pin out from the reference and create a get socket location node. in the socket name write the name of you're socket. in my case this is test

          [ATTACH=CONFIG]54073[/ATTACH]

          make sure the names are spelt exactly as they are in the socket manager

          [ATTACH=CONFIG]54074[/ATTACH]

          then just plug the return value into the location value on the play sound at location nodule. so you're finished blueprint will look like this

          [ATTACH=CONFIG]54075[/ATTACH]

          One final thing on the play sound at location nodule . click the drop down box shown by the arrow and select you're sound that you want to play. in my case i used the default editor sound called compileFailed

          [ATTACH=CONFIG]54076[/ATTACH]

          here is a demo project with it all working . just take the cube blueprint drop it in the scene multiple times and then run into it with the character and the sound will play.

          https://www.dropbox.com/s/3mop09w1nl...oject.zip?dl=0

          let me know if this helps thanks
          So this seems like exactly like mine is set up, the only difference is there is a vehicle involved in the collision (as opposed to a character). Also in your project (for some reason) I was unable to locate the socket you created on the mesh, but no matter, the sound does work and is heard in your example project (Thank you for doing/sending that).
          Another difference between your setup and mine is that the BP for the trashcan has already been created, so I'm using that, as opposed to creating cube and starting fresh. I can't tell any differences between our setups though, otherwise. I even noticed that you do not have "Collision generates hit events" checked, which seems odd but it's working for you.

          It may be something with the vehicle blueprint because I can't think of any possible thing wrong with my set up.

          I guess I'll keep looking into it on the vehicle side.

          Thanks again. Much appreciated.
          Adam Block
          Craft Media Group
          Award Winning Sound And Music For Games
          www.craftmediagroup.com
          adam@craftmediagroup.com

          Comment


            #20
            This thread helped me a lot, thank you. I'm sure you got this working by now @craft_media_group. I also have a vehicle set up (hitting rocks in a field). And one thing I had to adjust was the min radius on the attenuation of the soundcue. When you add a socket to a staticmesh it gets placed in the objects origin (which can be farther away from the objects collision area). So my camera (in the vehicle) was farther than the units I had on the soundcue.

            I also had to turn on Simulation Generates Hits Event in the Collision details.

            Comment

            Working...
            X