Announcement

Collapse
No announcement yet.

Bullet Hitboxes Suggestions

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

    Bullet Hitboxes Suggestions

    I'm trying to add hitboxes to my character and some AI bots. My current approach is adding static mesh component to the character blueprints, assigning shapes as the meshes, scaling them accordingly, and attaching them to sockets created in skeleton. This almost works the way I want it to, but having some problems with inaccurate projectile hits. Wanted to see if anyone had any suggestions for a different workflow than I'm using for making hitboxes.

    #2
    You can use the Physics asset for the skeleton as a global hitbox, and then use Get Hit Bone Name on traces/impacts to filter how the damage is processed (limbs, core, head, etc).

    Comment


      #3
      Thank you very much, that sounds like what i was looking for. I haven't messed with physics assets at all so I got a noob question, I'm using the default blue guy, he has physics asset already built, how do I tell my blueprint to use or not use physics asset?

      Comment


        #4
        There is also a per-poly collision option, but I do not know if it is 100% functional, nor the performance impact.

        If you are looking for additional details beyond the basics supplied by the physics asset, adding addition static meshes or shape components for key areas is not a bad approach.
        e.g. Using a sphere in place of the heart.
        Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

        Comment


          #5
          Originally posted by WarNerve View Post
          how do I tell my blueprint to use or not use physics asset?
          The skeletal mesh has a physics asset slot that you can use to specify which asset to use, leaving it as empty will mean no physics asset is used. If you do a raycast (in blueprint) against a skeletal mesh that has a physics asset it should just work.

          The per poly collision option is functional, but it's a lot more expensive and most likely not needed for these purposes.

          Comment


            #6
            Actually AFAIK you can't use per poly collision for skeletal meshes. At least you couldn't for a long time.

            Comment


              #7
              Rhythm I used physics asset and it was spot on what I needed, much easier than what I was going to do. With a switch on bone name I got it all working great, thank you.

              Comment


                #8
                An idea we are thinking about going with is using a traditional trimesh design as part of the base component of the character model blueprint.

                The concept is simple. The added trimesh is low in detail but with enough segmentation that it deforms with the player model and shares the same animations. In game it's invisible to the other players and parts of the surface mapped to an appropriate material with the idea that when a trace hits a given surface it responds with the material name as to a collision event. So if HM_legs is hit then a response can be generated from a limited amount of information.

                We have used the design in the past and it works but yet to fully test in UE4 so more or less theory on our part.

                P.S. if someone try this please let me know. One last thing to worry about if it will work or not.
                Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
                Custom Map Maker Discord
                https://discord.gg/t48GHkA
                Urban Terror https://www.urbanterror.info/home/

                Comment

                Working...
                X