Announcement

Collapse
No announcement yet.

Apply explosive force to Player

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

    Apply explosive force to Player

    I'm just trying to get the player to respond to the physics actors NX forcefield and/Or RB Radial impulse actors if within the radius of the impulse. Nothing seems to work. I have the RB Radial destroying a bunch of fractured meshes so I know they are working. I also have a custom pawn so I am thinking this might be the issue? I can't seem to find much about this on google or through search. Anyone have any clue about this or can point me in the right direction?

    #2
    Bump...and also clarifying my question: Is this the proper way to apply a force to the player? I have an explosion...I just want the player to be launched as well if inside a certain radius of the explosion. I suppose I could run a trace and get distance and apply a force based on that...but that seems clunky. If anyone has any ideas I would be very grateful.

    Indefiance

    Comment


      #3
      Spawn a radial force actor at the center of the explosion. Tweak the value until it feels right.

      Comment


        #4
        Well radial actors is a good solution but I just wanted to post so there is another way through kismet.

        Use the set velocity action. it works fine for me because as you see I make project for systems that are pretty lousy and the radial actors are expensive on memory.

        Best of luck with that.

        Comment


          #5
          Thanks for the replies. I am confused about a few things though. Does it need to be spawned then? I haven't tried that, but I already have RB Radial impulse actors that I trigger via kismet using a toggle turnon command. Is this not a good way to do it apparantly? They are already placed in the level and not enabled by default, but they work correctly and apply impulse and destroy the fractured meshes placed for the destruction, BUT they apply no force to the player. Is this normal? The other question I suppose is what exactly is the difference between RB physics actors and NX physics actors? I'll admit I haven't searched much for the difference,,,so If I find something in the next few minutes I will post back here for interested parties.

          Thanks Again,

          Indefiance

          Comment


            #6
            radial force actors should effect the player. check your settings because the actors should effect the players by default.

            Comment


              #7
              Okay...I think I have narrowed down the problem. It seems that if you make a custom pawn derived from UDKpawn that the Applyimpulse functions need to be included. Seems obvious in hindsight of course, and I'm not sure exactly how much to include from UTpawn, but I will post that code later if I figure it out for future reference for those out there who may encounter the same problem.

              Indefiance

              edit: still have no idea what the difference between RB and NX is though. Can't seem to find anything.

              Comment


                #8
                Well I have looked all over. I don't know what is wrong. What settings would change this? I found some that were 'ignore radial blah blah' in the pawn properties, but they weren't set. I have been testing in a basically blank map with UTGame as PIE and using the regular UTpawn. Nothing. I thought it might have been my custom Pawn class was missing some code, but if you say its supposed to work by default I don't know how.

                Thanks again for your help...

                Comment


                  #9
                  Sorry to necro the thread (not that a month and a half is that bad), but it doesn't look like your issue was ever solved. From my own experience and what I've read, I've found that RB Force Actor classes only affect Rigid Body actors. Go figure. But, you can turn your pawn into a Rigid Body by ragdolling it - which looks pretty cool with an explosion. Check out UTPawn's ForceRagdoll() function, specifically the call to the PlayFeignDeath() function. The PlayFeignDeath() function actually handles waking up from ragdoll mode too (in case the explosion doesn't kill your player and you want him to get back up later). If you're not inheriting from UTPawn, you'll want to get all that good stuff in your own class' function.

                  BTW, RB Force Actors are just what Epic developers put into the engine before the Nx Force Fields came along, which are based on Nvidia PhysX libraries.

                  Comment

                  Working...
                  X