Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

AnimFollow active ragdoll is now free to download.

Discussion in 'Assets and Asset Store' started by Kavorka, Jan 4, 2014.

  1. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Nameis
    It seems my response to your last post have disappeared. I am confident I wrote a reply. I have not heard from you since. I hope you found some solution or work around. You have really tried hard so I offer you to send me your character and I will see if I can set it up for you.

    (Note that I do not get email alerts for updates on post)

    Best wishes
    Patrik
     
    Coder_lab likes this.
  2. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    hi this sample is include in package ?
     
  3. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Hello kilik
    I am sorry, that sample does require some coding.
     
  4. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    for sure is why i asking about it
    it's complexe to code active desactive follow anim
    i have add Animfollow in wisp list for make battle fight game
    question is possible to active only part of model like arm for zombie
     
  5. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Yes it is possible to activate only parts of the model.
     
  6. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    that's sound great i have just buy finalik so i will wait little
    you get to do list on this tool
     
  7. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    64
    Great asset, just bought it and set up my character with it.

    Four questions:
    • Why do the number of transforms on the master and slave need to match during setup? Is there a way to circumvent this?
    • Is there a way to activate the 'falling' state to a part of the body, i.e. without the character actually falling? E.g. just the upper body or a limb.
    • Is there a way to make characters recover (while still standing) after a fall is triggered?
    • Are you planning to further develop the asset?
    I suppose my last #2 & #3 can be resolved if I customize the asset so that it may suit my needs better, but it'd only make sense if you don't plan to add in those features yourself at some point.

    Cheers,

    Khaya
     
  8. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Hello, I am glad you like it.
    1) Yes, you may add transforms to the ragdoll dynamically after the automated setup has completed. You may for example add a gun to the hand as a child transform. There are also other ways to circumvent that. It is not terrible hard, but it has to be done in code.
    2) Yes, you can reduce, in the P - Profiles, the strength of any limb. I show alittle about this in this slightly outdated video:

    3) Yes there is, but it is not elementary and require you to modify the RagdollControl script. I have done it here:

    4) I have put the project aside for a while but hope to get new motivation as the dark and cold season enters. But so far I have not gotten in the spirit.
     
  9. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    64
    Hi Kavorka,

    Thanks for the quick & honest reply. After analyzing the RagdollControl script it indeed becomes clear how it can be edited in order to be tailored to different needs.

    On that note, could you please share the script you used for that second video?

    Hope you will find the spirit to continue working on this at some point! It's already great, but has so much more potential!

    Best,

    Khaya
     
  10. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    I am glad you see the potential. Also glad that you find the RagdollControl script workable for the skilled programmer.

    I am sorry, but the project of the second video does no longer exist.
     
  11. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Can this ragdoll system be used with the legacy animation system as well, or only Mecanim?
     
  12. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    The AnimFollow script can easily be modified to be used with legacy. The RagdollControl script is written for mecanim and has to be converted to work with legacy.
     
  13. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    Hi Patrik!

    No worries about your response not showing up - I've been trying to fix this myself intermittently for quite a while to give you some breathing space :) Anyone new to this thread, take note that Patrik has an outstanding record of support and customer service! He's been very diligent in providing the most value for money he possibly can, which I am very grateful for.

    In response to your question, I have come very close to getting AnimFollow working with another character - Mixamo's free 'Beta' model, doing my best to follow your tutorials exactly (which are VERY useful, thank you for such excellent product support). The only problem I am having now is with the foot IK (the log is free of any errors or messages). The Beta model can move around, but her right leg has issues with placement, and distorts badly during animations.

    I have noticed that another one of your assets on the asset store is a FootIK solution, perhaps it would be possible to integrate and use that instead if it is easily compatible. Or perhaps the Moving Platform Controller, as that appears to have FootIK also?

    Thanks,

    Nameis
     
    Last edited: Oct 6, 2014
    reese01 likes this.
  14. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Thank you for the supporting text. There is a bug in the foot IK that makes it behave weird on some models. It is fixed in the Moving Platform Controller´s IK. I just sent you the replacement C# files. Meanwhile, take a look at the knee transform of your model. If the knee transform's orientation is different than that of Ethan, then the new files will fix the IK problem. Let me know if you did not get the files or if you have further problems.
     
  15. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Here follows a tiny hint of how I accomplished the ragdoll round kick scene:

    For those scenes I added a kick animation to the character and a public bool, disableFall, to the RagdollControl script.
    I also changed line 210 in the RagdollControl from

    if (shotByBullet || numberOfCollisions > 0 && (collisionSpeed > graceSpeed || (!(gettingUp || falling) && limbErrorMagnitude > noGhostLimit)) || (limbErrorMagnitude > noGhostLimit2 && orientated))

    to

    if (!disableFall && (shotByBullet || numberOfCollisions > 0 && (collisionSpeed > graceSpeed || (!(gettingUp || falling) && limbErrorMagnitude > noGhostLimit)) || (limbErrorMagnitude > noGhostLimit2 && orientated)))

    I then programmed the disableFall bool to become true when the kick animation was playing. That way the kicking character did not fall, only the kicked character fell.
     
  16. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    428
    Hey,

    Did you get access to unity 5 yet?
     
  17. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    No, I did not.
     
  18. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    64
    I do have access to Unity 5, and I can confirm it (mostly) works with U5. There's some noise rotation at the hips, but I'm sure it's nothing that cannot be fixed with a little bit of tweaking from the user's end.
     
  19. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Thanks Ragoo, that is good news. The noise is probably fixed by lowering PTorque and/or DTorque.
     
  20. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    64
    After some more testing, there's only a few lines of code in the RagdollControl script that need to be edited, which is transitions from "Any State" to the getup states. In this case, "Any State" was renamed to "Entry".

    I can confirm that lowering PTorque and DTorque fixes the noise rotation!
     
  21. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Super! Big thanks for the help.
     
  22. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Hello Kavorka,

    Has this been tested with unity 5 beta?

    I Purchase your moving platforms plugin but it's not working with Unity 5 beta, so I would think that this probably doesnt work either?
     
  23. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Hello
    The three posts immediatelly before yours describe how this has been tested in Unity 5 beta, and that it works after a few tweaks.

    May I ask you to tell me in an email what the problem with moving platforms is?

    Thanks
     
  24. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    64
    I tested it with Unity 5, and it works immediately without compiler errors.

    However, there is a 'bug' where the fallen actor doesn't get up again. This is managed in a script called RagdollControl.cs. All you need to do is open the Animator Hash script, and change two lines of code from "Any State" to "Entry" - this makes the character stand up again work normally.

    Then, in order to fix some noise rotation around the hips (since Unity 5 has overhauled the physics system) - decrease two variables DTorque and PTorque (you can do that in the inspector), and you're good to go.
     
  25. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Thanks for the tip Ragoo.

    I'm going to have a think about purchase this one.

    Thanks for your time
     
  26. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Hello Patrik

    I see at the bottom of the PDF "This is beta. There may be some loose ends that you will have to fix yourself. There is no rigidbody on the example character so it will run straight through walls."

    I realize this is a problem. If the character has a rigid body he will slide across the screen every time he bumps into something.

    This is a pretty big loose end. Do you think you will be able to solve it?

    I really hope you can. besides this loose end this asset is brilliant. I don't think I will be able to solve this issue. Physics is not my thing.

    Any tips?

     
  27. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    That must be in the PDF for the moving platforms asset. The AnimFollow character is all rigidbodies. Be sure to look at the tutorial and play the web player before you buy.

    Edit: If you actually are referring to the moving platforms asset not having a rigidbody, I have no immediate plans to put a rigidbody on that character. That text is there to clearly inform that there is no collider on that character.
     
    Last edited: Nov 30, 2014
  28. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Yes sorry I'm talking about moving platforms. I dont see a thread for that kit.

    Can I ask why don't you want to add a rigidbody on there?

    When I add a rigid body on my character or nathan, it starts to slide a little whenever it bumps into a wall. it continues to do that. are you aware of this? is that the reason why you didn't add one?
     
    Last edited: Nov 30, 2014
  29. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    There is a thread. But I am glad to answer your question here as well. I did not add a rigidbody because that was not in the scope of that project. I only wanted to explore having a character that could handle moving platforms and exert reaction forces on the environment.
    Adding a kinematic rigidbody and a capsule collider to the root transform would allow it to push things around, but it would still go through walls. It is not all elementary to add a rigidbody the proper way, but maybe you can find a clever way to do it without all the physics and programming I would have done.
    Best wishes
     
  30. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    so what you're saying is that if I'm not able to figure out a clever way to get it not going through wall then this is not usable.

    Now if a clever man like yourself with the knowledge to be able to build these sort of assets can't do it then I'm pretty sure I won't be able too. lol Sorry I don't think I'm clever than you or else I would have made the asset myself :/

    I'm going to pretend I'm clever for an hour or so and see what happens.

    Oh by the way, the rigidbody element of this asset IS in the scope of this asset for sure...

    Don't you think it's only right for you to try to finish this properly?

    I'm not asking for features, I'm just asking for it to work well enough for me to use in a game. Lets face it, if the character walks through walls then never mind being able to apply forces to platforms, this thing will be useless?? don't you think?
     
  31. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Maybe I can, maybe I can't. I am sorry.
     
    Last edited: Nov 30, 2014
  32. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Wait so as of now, using animfollow the character walks through walls?
     
  33. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    No, the other asset, moving platforms, that character has no collider and will walk through walls. For that asset you have to attach a collider yourself if you want one. The AnimFollow character ragdolls if you hit the wall too hard, and should deflect if you grace the wall. Some may think it ragdolls to easily, it is tweakable to some extent.
     
  34. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    I was wondering would it be possible to implement some sort of recovery system when falling. How hard do you think that would be?
     
  35. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    It's what I am doing in the PBC. I find it not super easy to get it satisfactory. In the PBC I utilize several systems, each system is, by itself, not that hard to get to 80 %, but to get all the systems to cooperate gracefully has been testing my stamina.

    I did this earlier.



    That was done with a modified asset store AnimFollow. There I disabled the fall so that the master was always standing, but the ragdoll strength was briefly limited when hit and thus knocked back from the blow. A moment after the hit I re-positioned the master to the ragdoll and lerped the ragdoll strength back on. I gave the master some velocity to make the event look natural. It is doable, but in code. You would likely have to spend a fair time to get comfortable with the AnimFollow code. Very hard for some, not that hard for others.
     
    blueivy likes this.
  36. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    It would also be cool to do a blend to a recovery animation that the weakened ragdoll would try to follow but in a "ragdolly" way. That would probably require quite some fidgeting and tuning to be made to look good. Also there could be a "protect" animation played just before the hit.
     
    blueivy likes this.
  37. TimK_gumi

    TimK_gumi

    Joined:
    Nov 14, 2014
    Posts:
    2
    Just a heads up, in ragdollHitByBullet, rather than do this:

    if (!(ragdollControl = GetComponentInChildren<RagdollControl_AF>()))

    You can just add the RequireComponent attribute to the class. Then, if someone adds ragdollHitByBullet to a game object, Unity will automagically add a RagdollControl_AF as well. One less thing for people to email support about!

    Edit: Although, now I think of it, it's not exactly the same thing. You might not want to require the components be on the same object, but only in the same hierarchy. Carry on, nothing to see here!
     
  38. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Submitted an update to the asset store. Noting major, just finally got around to send the fixed foot IK, so that now models with knee transforms orientated different than Ethan's also work properly.

    Also Added an optional "stay dead on head-shot" feature. So that for example if you use this on a zombie enemy it will ragdoll and get back up every time you shoot it, but if you shoot it in the head it will stay dead. The character will also destroy itself when it goes off camera. That way you can slaughter a lot of zombies without them piling up if you wish.
     
  39. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837

    i try reproduce sample but found where player fall on hit so it's give that's at this time
     
  40. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Good work. Try this:

     
  41. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    another try



    i got only
    This version of AnimFollow works better with one extra colleder in the spine on

    and ragdoll look not playing correctly
    i think's it's about confugurable joint low angular limit i try fix
     
  42. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Sorry, no I don't know why that character falls in a T-pose. It looks like the configurable joints does not loose their strength when the character falls.

    I don't know what changes you have made or why the character sometimes seem to snap away, but the character snapping away could maybe be mitigated by fiddling with the parameters: ghostLimit and graceSpeed in RagdollControl.
     
  43. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    i found for tpose it's configurable joints angular limit but now caracther vibrates i continue search for parameters working better with pforce if i have strengh to add extra spine maybie
     
    Last edited: Jan 27, 2015
  44. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    maybie you have already try use biped for create the ragdoll ?

    result this eror
    D6Joint::loadFromDesc: desc.isValid() fails!
    UnityEngine.ConfigurableJoint:set_angularYMotion(ConfigurableJointMotion)
    AnimFollow.AnimFollow_AF:EnableJointLimits(Boolean) (at Assets/AF_SFIK/AnimFollow/Scripts/RagdollScripts/AnimFollow_AF.cs:436)
    AnimFollow.AnimFollow_AF:Awake() (at Assets/AF_SFIK/AnimFollow/Scripts/RagdollScripts/AnimFollow_AF.cs:278)
     
  45. redzone1117

    redzone1117

    Joined:
    Jan 30, 2015
    Posts:
    3
    I have a problem with my rigidbody..the legs don't move properly with the rest of the armature. unity_screen.jpg
     
  46. redzone1117

    redzone1117

    Joined:
    Jan 30, 2015
    Posts:
    3
    running_askew.jpg This is how he runs.
     
  47. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    That could be that you are not using the latest version. I uploaded a new version a few weeks back. The older version had a bug that had that problem on some models. Try that first. Also make sure the ragdoll and all ragdoll children are on an ignored layer e.g. water.
     
    redzone1117 likes this.
  48. redzone1117

    redzone1117

    Joined:
    Jan 30, 2015
    Posts:
    3
    I am using the older version..what was updated? I have set all of the ragdoll and its children on the water layer
     
  49. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    237
    Version.5
    • Fixed a bug in the foot IK that made the knees bend strange on some models.
    • Added a stay dead on head-shot feature. Character is destroyed next time it goes off camera.
     
    redzone1117 likes this.
  50. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    837
    Yes so i have always this trouble for understand on Ikpos when the fall is set to active
    for exemple here who interesed me i got followTerrain when the map is not tagged character fall directly
    but ik doesn't move up in staircase on inverse is i tag to i try find mix between this too value for
    get better look of gravity result