Search Unity

Low Frame Animation: Collision Problems

Discussion in 'Animation' started by victorML, Dec 4, 2019.

  1. victorML

    victorML

    Joined:
    Jul 5, 2017
    Posts:
    38
    Hello, I'm trying to make a precise collision between my Character(Sword) and an Enemy.

    I'm tried both with Raycast and Colliders but the problem is the same.
    In the following picture you can see the points where the Sword pass through, I'm printing transform.position in update an as you can see the "positions" where the animation is hitting are just four.

    What I mean is that I cannot look for a continuous collision detection if my animation just make this 4 positions, if an Enemy is outside this area he won't be impacted.

    ¿ Do you know why is this happening ?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    658
    Smash Bros does hit boxes by using multiple capsules and changing their rotation and size to cover the area between two points. I've never done it so I'm not sure about the specifics of how it would work, but it sounds like a good approach to me.
     
  3. victorML

    victorML

    Joined:
    Jul 5, 2017
    Posts:
    38
    Finally I tried an approach quite similar with raycast.

    What I did is to capture the four points where the sword collide in fact and amplify the raycast area with close rays.
    It's not so clean but it works...

    The multiple collider rotating and moving could work also.