Search Unity

Soldier Animation Pack

Discussion in 'Assets and Asset Store' started by Graphicalgeek, Jun 19, 2013.

  1. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    simple fix, line 373 SoldierController:

    Code (csharp):
    1. // make sure we never go too fast
    2.         if ( newVelocity.x > runSpeed)
    3.             newVelocity.x = runSpeed;
    4.         else if( newVelocity.x < -runSpeed)
    5.             newVelocity.x = -runSpeed;
    6.            
    7.         if( newVelocity.z > runSpeed)
    8.             newVelocity.z = runSpeed;
    9.         else if( newVelocity.z < -runSpeed)
    10.             newVelocity.z = -runSpeed;
     
  2. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    Hi

    Just to make sure before I buy it, Is the scene from the web demo included in the asset?
     
  3. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Yes it is.
     
  4. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    I've address this and am submitting an update. It was not adding the AirControl force in FixedUpdate, so the editor and player were different.
     
    Last edited: May 14, 2014
  5. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    at first, Im not so experienced with animations. Is it possible to take an another rigged soldier, probably one of the free soldier pack, and use this animations for it?
     
  6. indy2005

    indy2005

    Joined:
    Aug 22, 2009
    Posts:
    81
    None of the web player demos are working for me, they just go black. Have tried on Mac OSX and on Windows 8...same thing.
     
  7. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Yes, this should be possible.
    .
     
    Last edited: Oct 10, 2014
  8. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Can you please try again? I've updated the web player and its working locally on Chrome and Firefox.
    .
     
    Last edited: Oct 10, 2014
  9. TRALLALAL

    TRALLALAL

    Joined:
    Sep 7, 2013
    Posts:
    132
    Hello.

    Before I buy this I need an answer, a friend of mine made a soldier model for me and I was wondering if I could use your animations with it, if so, how?

    EDIT: I read the post above, I will buy it as soon as I have the moneys!
     
    Last edited: Jul 14, 2014
  10. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Some questions from the Asset Page:


    I've got some questions for you.

    1) It feels like the running in the sample scene is a bit jerky. I checked the code and I guess the running is frame rate dependent. Isn't physics movement done in Fixed Update and the Input in Update?

    2) Are there any variations of running cycle?

    3) How can I make other Humonoid Models work with these animations? I tried on one but I guess the bone structure isn't the same. Is there any workaround?

    4) When the player is aiming and it moves side ways there is some jitter in the animation. Can you please check?
    .
     
    Last edited: Oct 10, 2014
  11. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    1. The UpdateMovement() where control input it taken is called inside Update() and the only physics movement done in Fixed Update() is downward gravity pull.

    2. There are 4 directional run animations for each of the 4 weapon types, so 16 running animations. Is this what you're asking?

    3. If you've properly set them up and configured them correctly in Mecanim the joints should all map and the animations work. If you're having issues can you post screenshots, videos, or more information?

    4. Here's a link to a video of the sideways strafing. Is this what you are seeing?

     
  12. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    1) I think all the force and velocity are to be applied in FixedUpdate() in case of rigidbody. Only Impulsive force can be applied in Update()

    2) different running styles ( for like different characters in the game)

    3) If there are less bones, the animations will still work properly? I am trying to make this model work (https://www.assetstore.unity3d.com/en/#!/content/18220) but it has less bones.

    4) The video is private. Though when you are shooting and moving diagonal unity can't blend all 3 in the best manner but it still looks fine :)

    Thanks for the reply! Great support
     
  13. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    1. Yes, after reading some more documentation it appears you are correct. I will have to update the script to account for this.

    2. No, I hadn't planned on that. Since there are so many different run animations, it would be a massive amount of work to create different flavors of run cycles, and I don't think that's as valuable an addition as animations for new types of actions would be.

    3. I would need to be able to examine the .fbx file to know for sure. If a model doesn't have a minimum number of specific bones, it won't work with Mecanim Humanoid rigging. (in older versions of this pack the Soldier was missing shoulder and toe bones, which is how I know this) It can still work with Generic Mecanim and use the rest of the Mecanim features, but trying to retarget animation onto it won't work as well, possibly not at all.

    4. I'm not sure anything much be done with the way to control blends inside of a Blend Tree, but I will take a look when I rework the scripting.
    .
     
    Last edited: Oct 10, 2014
  14. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    If you need me to, I can rig that character to the Soldier skeleton.

    .
     
  15. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    No its fine. You answered the question in previous post (I will try to do that on my own and see how it works).

    Just one request, can you add shotgun animations?That is the only weapon category left in the pack

    Thanks :)
     
    Last edited: Oct 9, 2014
  16. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Yeah, I think since most of the animations for it could use the existing Rifle animations, it would just need a custom pump-action type reload and more powerful looking recoil on the firing animation. I'll add it when I do the other updates! :)
    .
     
  17. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Great! can you add some low poly rifles(Like the m4, short barrel ak47 ) and smg (mp5, k1A) :D ?
     
  18. emiller100

    emiller100

    Joined:
    Jul 17, 2010
    Posts:
    39
    Could you add any swimming animations? Could you add push/pull animations?
     
  19. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Yes, I can add them. What do you see happening with the weapons for these animations?
    .
     
  20. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    This is an animation pack, and the weapons included in it are mainly for reference to show the animations. Any additional weapons would be in the Soldiers and Weapons Pack, or Weapons, Effects, and Sounds pack.
    .
     
  21. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    I just submitted an update with Swimming added! It was quite a challenge as much of the code had to be modified for the control aspect, and took a bit longer than I'd hoped. I'll add the push anims in the next update as I think that one might take a while for the controls as well.
     
  22. emiller100

    emiller100

    Joined:
    Jul 17, 2010
    Posts:
    39
    I would hide the weapon or have it go to the back for large weapons or belt for small ones while swimming. Thanks for adding this.
     
  23. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618


    I can't get my character to run properly using the soldier ac and my characters avatar. When I use the soldiers avatar my character doesn't leave the T pose. Can anyone tell me what im doing wrong?

    My character wont move forward while jumping and the roll animation looks stiff. The camera doesn't follow the character either.
     
    Last edited: Nov 7, 2014
  24. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    I'm not sure what method you've used to replace the existing character with your model, but here's a video on the correct process.


    Without being able to see your setup, I'm guessing that your Avatar isn't defined correctly and that's why the animation is not being applied properly. Can you take a look at the above video and make sure you've followed the setup steps. If that still doesn't help, I may need you to post some screenshots of your Avatar or other setup.
    .
     
  25. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Seller got me up and running. Thanks!
     
    Last edited: Nov 16, 2014
  26. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Just submitted update with Push Pull animations!
     
  27. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    with the latest update, the soldier just falls through the floor for me. is this happening to anyone else?

    update: nevermind, I'm an idiot. had player->ground collisions disabled for who knows what reason in the physicsmanager.
     
    theANMATOR2b likes this.
  28. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    I've purchased your Ninja pack. Is it possible (or practical) to integrate the Ninja animations with the Soldier Pack so my character can use guns and swords? Both animation controllers are complex.
     
  29. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Hey Keywise,

    Its definitely possible. Practically, it would require some work, like adding in all the Ninja animations into the Soldier Animator Controller, and then setting up Parameters, and finally adding in the SetTrigger/SetBool calls in code to play those animations.

    http://docs.unity3d.com/Manual/AnimationParameters.html
     
  30. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Thank you for the direction. I've purchased the Soldier Pack and attempted the first step of replacing the soldier with the Ninja Warrior. I carefully followed your video on Character Replacement from Nov 8. I changed the Ninja's animation controller to use the Solider's. Since the Solider had "Apply Root Motion" unchecked, I did the same for the Ninja.

    When I hit play, the Ninja rotates 90 degrees and sinks into the flow.

    Let me know if there is any additional info I can provide. I'm running 5.2.3 in PC/Mac platform settings.

    Thanks for your help.

    Before Play
    NinjaWarrior1.jpg

    On Play
    NinjaWarrior2.jpg
     
  31. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Oh, you'll need to switch the Soldier animations from Rig Type Generic to Humanoid.

    RigType.jpg
     
  32. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    That worked to get the Ninja Warrior rotation upright. However, he sinks into the floor from his waist up.

    Also, instead of idling, the solider-ninja starts moving quickly on its own, then jumps completely out the environment. I've tried both Apply Root Motion checked and unchecked.

    Let me know if there is any additional info I can provide. Best Regards.
     
  33. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I helped a guy with retargeting a model and additional animation sets for this soldier pack early last year - I think it's because the root of the soldier is at the feet and the root of the ninja model is at his waste.
    The guy I was helping said it was alright to just offset his Y transformation and his model/rig retargeted perfectly.
    I don't know if this is acceptable practice - but he was good with it.
     
  34. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Hi Anmator2b - Thank you for the suggestion. That lifted him up from the floor. I suspect this may be an issue later when I start to integrate the Ninja animations into the Solider animation controller, but that is a problem for another day.

    Still remaining is the issue with the solider-ninja moving on its own instead of idling.
     
  35. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Kristopher - any suggestions on how to integrate the Ninja into the Solider correctly so it will idle correctly?
     
  36. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    A week later I found the cause of the problem. all the animations in the Solider pack are "Generic", while the Ninja is "Humanoid". Wasn't expected that from the same vendor.
     
  37. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Didn't Graphicalgeek mention that on your second post? :)
     
  38. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Yes, he did, but the problem is more complex than just switching the Solider animations to Humanoid.

    Switching the Solider Model from Generic to Humanoid reproduces the problem (he sinks into the floor). Switching the Ninja Warrior Model the other way (from Humanoid to Generic) moves him to the right place, but generates run-time errors. The pieces that make up these two products have non-obvious differences. Since they were from the same vendor, I thought they would work together, but that is not the case.
     
    theANMATOR2b likes this.