Announcement

Collapse
No announcement yet.

Best way to process melee hit?

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

    Best way to process melee hit?

    Hey everyone, I'm making a little project in which my character has a sword. I would like to handle the moment when the sword hit an enemy. Actually I have two solutions in mind but I don't know which one to use. Is it better to trace a box at the time I want to hit to happen or should I handle the collisions of the sword with enemies. The second solution seems to give more true to life results, but I think that it can also give collision problems... I'm not sure.

    #2
    The naive way is use collisions to detect hits.
    That is prone to errors, performance dependent.

    Some brute-force it with multiple line traces per sword animation...

    I just use anim notifies + manual calculations of distance between vectors and "collision flags" which is a Enum dictated by resulting dot product of the two vectors.. I don't use PhysX :s
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      #3
      This seems to be a more effective way of tackling this problem. Thanks

      Comment

      Working...
      X