Search Unity

Animation and hit characteristics for mecanized humanoid model

Discussion in 'Animation' started by timmetim, Apr 12, 2014.

  1. timmetim


    Nov 6, 2013
    In my Unity Project (3rd person shooter) i am getting pretty close on my enemy AI with NavMeshAgents, Mecanim, etc.

    I have mecanim working for all my hit, knock down, get up, death, chase, shoot, reload, etc animations. The only issue i have is that the direction the enemies fall or take hits from isn't managed by physics but animations and those animations are not relative to the direction and force of the projectile that hits them. So if you shoot an humanoid mecanized character from behind he still reacts as if he was hit from the front etc.

    Further, If I shoot an enemy very close with a shotgun it should have a greater force applied to them than if I shoot it from the same location with a small handgun. If i shoot it in the foot or leg versus the upper body or head I want different physics applied to those bones and the model respectively based on direction and force. Aka the hit reaction would be greater with a shotgun and the model would react to the direction and force of the projectile.

    I have this working with non-humanoid objects and I am happy but not with the enemies....

    I have several options (i think :)):

    1. Lower my standards for my enemy AI and death characteristics (never good for guys like us)
    2. Create animations for different directions and types of impacts. I have to do things like 2d blend trees with animations for specific hit animations (direction and force or something similar). Lots and Lots and Lots of mecanim animation work. Plus i would need hit animations similar to my aim animations with additive hits, layers, etc.
    3. I could use Ragdolls potentially. Stop the animator and apply the physics at the last known animated state the model is in. This seems quite hard as well as and I am sure.

    Ideal situation would be to have the AI utilize mecanim and navmesh agent for chase, shoot, etc with physics applied to the enemies on hit and knock down animations (i know you can't do that as the animation overrides the physics of a humanoid).

    Thoughts? Help?

    Thanks in advance!