Search Unity

Collision on a non-humanoid animated creature

Discussion in 'Animation' started by Quested, Mar 16, 2019.

  1. Quested

    Quested

    Joined:
    May 23, 2013
    Posts:
    13
    Hello,

    I have been using Unity for many years now, but I have never really worried about accurate collision with animated creatures. Now I do though and I was wondering how you can get something like an animated mesh collider. The issue is the creatures are not humanoid, so their shapes can't be fitted very well by placing some box and capsule collliders down. I was wondering how for example the game "The Forest" has done this, I have never played it myself and saw some videos about it and there you could hit some very weird creatures while they were animating, with a bow. That is what I want to achieve too. I found some "solutions" already, but I highly doubt they are very efficient, performant or best practice:

    1. Place down Box and Capsule colliders at each Bone(will not work very well, due the irregular shapes and also I'm worried what happens when the model gets changed by the artist - do I have to replace them all?)

    2. Have the artist place down tons of boxes and spheres and other simple geometry to somehow match the model( I fear the performance will be terrible when using this approach, because I would have to add like 20+ Mesh colliders for just one instance of the model)

    3. Update a mesh collider each frame with the new mesh after the animation has been applied (Sounds terribly slow to me)

    Does anyone have a better solution or at least an idea how this could be solved?

    Best Regards