Announcement

Collapse
No announcement yet.

Damaging Individual Body Parts of Enemies / Monsters

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

    Damaging Individual Body Parts of Enemies / Monsters

    Greetings Everyone!

    I want to damage individual body parts of the enemy, like the legs and arms. The player would attack certain body parts and they would get separated from the monster (like Monster Hunter World for example, you could separate tail from the monster after damaging it).
    My question is how would I trace the hit for the individual parts rather than the whole mesh itself. Secondly, would I need separate health for each individual body part (e.g. like Leg 1, Leg 2 etc.)?
    I am more concerned with implementation and functionality rather than aesthetics of it. Any help would be greatly appreciated!

    Bonus Quest: I want the camera to lock on the specified Body Part when the player presses a button. Any ideas how to do it?

    -Regards AA

    #2
    On Hit -> Break Result -> Hit Bone Name

    or

    If you want to group bones together ...say (r_upperarm, r_lower arm, r_hand...fingers), then create an r_arm phys material and apply it to each r_arm component shape under collision.
    When you get a hit you'd get the phys material hit, convert to string -> switch on string -> calc damage, apply it etc etc.


    For grouping damage ... say arm you'd create a float variable for each grouping (r_arm, r_leg...hips, chest, head etc) and set it's default health. You'd deduct damage directly to the grouping.
    e.g. hit in r_hand would apply damage deduction to r_arm float.


    Click image for larger version

Name:	hit_1.jpg
Views:	226
Size:	217.3 KB
ID:	1711124

    Click image for larger version

Name:	hit_2.jpg
Views:	200
Size:	144.4 KB
ID:	1711125

    Click image for larger version

Name:	hit_3.jpg
Views:	200
Size:	85.5 KB
ID:	1711126

    Comment


      #3
      I'm using collision overlaps to acquire the Hit Result (returns individual components and bones names). This would work for Traces too. The key factor to the dismemberment is modular parts or the ability to dynamic split the meshes. I'm using modular static/proc meshes, voxel objects. and collision components attached to the skeleton bone/sockets. The static/proc meshes/voxel objects for visuals & collisions, and collision objects for invisible weakpoints. This allows me to dismember/destroy individual parts with multiplayer slicing mechanic to be expanded until multi-slice bullet damage.
      HeadlessStudios.com - S P A G H E T T I: Ninja Swords, Guns & Monsters & Other S**t! - Join Our Discord

      Comment


        #4
        My mistake, I should have mentioned that I am using Collision Overlaps traces/events instead of line traces. I was testing for weapon collision against body collision.
        If you want to group bones together ...say (r_upperarm, r_lower arm, r_hand...fingers), then create an r_arm phys material and apply it to each r_arm component shape under collision.
        When you get a hit you'd get the phys material hit, convert to string -> switch on string -> calc damage, apply it etc etc.
        this grouping idea is really nice and will make the code much cleaner I think
        The key factor to the dismemberment is modular parts or the ability to dynamic split the meshes. I'm using modular static/proc meshes, voxel objects. and collision components attached to the skeleton bone/sockets. The static/proc meshes/voxel objects for visuals & collisions
        My issue with this is that I was unable to properly approximate the skeletal mesh of monster with collision components. Any ideas how to get better collision approximation?
        BTW nice looking game you have there!

        Comment

        Working...
        X