Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Causing damage based on rigidbody collision

Discussion in '2D' started by Peter Ples, Dec 26, 2013.

  1. Peter Ples

    Peter Ples

    Joined:
    Mar 12, 2013
    Posts:
    237
    I was wondering if there is a standard way of causing damage to a character based on how hard it runs into an object or if something falls on it.

    My first try I am attempting is storing the x and y from the last frame and if there is a drastic change in velocity but that doesn't account for if something hits the character.

    Any thoughts?
     
  2. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412