Announcement

Collapse
No announcement yet.

Explosions help

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

    Explosions help

    Hi Everyone, I made an explosive projectile/Grenades that work.....Kind of. I say kind of due to the fact that number 1, the projectile class no longer collides with my physics actor, nor do they fire off their intended particles/explosion sounds. Attached is the smoke grenade component/blueprint as the frag grenade and explosive projectile pretty much copy the same template. Any help would be much appreciated. Keep in mind that I am also using Unreal Engine 4.1's 1st person template. Thanks in advance guys
    Click image for larger version

Name:	SmokeGrenadeBluePrint.jpg
Views:	1
Size:	491.3 KB
ID:	1134371
    Click image for larger version

Name:	SmokeGrenadeBluePrint.jpg
Views:	1
Size:	491.3 KB
ID:	1134371

    #2
    I will move this into the bp section so that it is in the right place

    Comment


      #3
      I'd change the "Play Sound Attached" function to "Play Sound At Location" and then set the "Location" pin to "Get Actor Location" with a target of "Self". Hopefully, that should fix the sound issues. Also, the "Get World Location" functions shouldn't be necessary, run the "Location" pin to "Get Actor Location" with a target of "Self" (again). Regarding the collision, do you have the collision properties set correctly in the components section? Also, what happens if you hook up the "Impulse" pin from the "Add Impulse At Location" function?


      Lightmap Tutorial

      Comment


        #4
        The impulse pin takes the velocity from the projectile and adds some more impulse. I basically unplugged that because I don't want additional impulse on the projectile class. As far as collision is concerned with my static meshes, I gave it some auto convex collision, then I set the use complex collision as simple for the most point to point collision I could get. After that, I set the collision properties to physics actor, and still no luck. This setup works well with the previous Unreal 4.02 version but not with 4.1. It's really weird.

        Comment


          #5
          Originally posted by dougemmedhen View Post
          The impulse pin takes the velocity from the projectile and adds some more impulse. I basically unplugged that because I don't want additional impulse on the projectile class.
          I know what it does, but I thought that it was strange that you completely unpinned it. Did you try what I suggested above? The grenades I have created with Blueprint use that setup [you can view an example in this thread].


          Lightmap Tutorial

          Comment


            #6
            I just tried your suggestions but still no luck. The sound still doesn't play and the sphere doesn't collide with the other physics actors. Plus the particle emitter still refuses to work for me.

            Comment


              #7
              OK, I'll create a Blueprint how you've got it set up and see what the problem is. Give me a couple of minutes.


              Lightmap Tutorial

              Comment


                #8
                Ok here is something REAALLY weird. While messing around in my character component for other reasons, when I added a box component but forgot to turn off its collision, the explosive alt fire projectile worked with sound and everything. What does this mean?

                Comment


                  #9
                  I got your Blueprint layout working OK by changing the "OnComponentBeginOverlap" event to a "Hit" event and adding a reference (i.e. "getter") for the "Attach To Component" property on the "Play Sound Attached" function. When you change this, you'll need to remove the "Impulse" function or set values for it. I still think the method I mentioned earlier is more efficient, but ultimately if it works, that's all that matters. Is there any reason you want to use "OnComponentBeginOverlap" instead of "Hit"?
                  Last edited by Ben85; 04-30-2014, 08:55 PM.


                  Lightmap Tutorial

                  Comment


                    #10
                    Nope, I just discovered hit, while getting my portal gun to work. Sorry to waste your time if I did.

                    Comment


                      #11
                      I got my grenade working. Thanks for the help.

                      Comment


                        #12
                        If anyone wants my lvl with blue prints and all, with how I got my stuff working plz wait until this weekend. I will have a video showcase with my first update. Previous update can be found below:

                        http://www.youtube.com/watch?v=QNZLp...VXj1bfaDX7i2yQ

                        Comment


                          #13
                          Originally posted by dougemmedhen View Post
                          If anyone wants my lvl with blue prints and all, with how I got my stuff working plz wait until this weekend. I will have a video showcase with my first update. Previous update can be found below:

                          http://www.youtube.com/watch?v=QNZLp...VXj1bfaDX7i2yQ
                          Hey man, I'm actually trying to make certain kinds of granades right now, could you share me your code or help me out a bit? ;D

                          Comment

                          Working...
                          X