Search Unity

AnimFollow active ragdoll is now free to download.

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

  1. ken2ns2

    ken2ns2

    Joined:
    Dec 24, 2013
    Posts:
    2
    Hello,

    Im having a slight problem with the rag doll. I followed all the tuts but my character does not fall on impact as your example character. My character seem more stiff and less less affected but the cannonball launch. I even put my character rag doll in the same scene as the example rag doll and my character just ran him right over. All the force and torque parameters are the same. Could the initial rag doll creation strength play a role in this?
     
  2. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    You have the ragdoll running, just not falling?
    If so the AnimFollow script is working. The falling is initiated by the RagdollControl script, have you added the ragdollControl to the ragdoll?
    Is there no warnings in the console?
    I can't say what the problem is yet, but we will fix this. Email me.
     
  3. ken2ns2

    ken2ns2

    Joined:
    Dec 24, 2013
    Posts:
    2
    Yes it runs but i can only get character to fall if i hit the fall Bool in the inspector. I also got it to fall but increasing the size of the cannon ball to be bigger than my character and increase the force. So no small hit like to leg or head will cause the character to fall. I will email you.
     
  4. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    The new animation is looking a lot smoother, nice job.
     
  5. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Thank you Setmaster. I just sent you the update on google drive, should be in your mail.
     
  6. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    In the updated version you may have a simple jump function by:

    On line 71 in script IK_ShootRays_AF, replace this:

    Code (csharp):
    1.             if (followTerrain)
    2.             {
    3.                 transform.position = new Vector3(transform.position.x, Mathf.Lerp(transform.position.y, Mathf.Min(raycastHitLeftFoot.point.y, raycastHitRightFoot.point.y), transformYLerp * extraYLerp * deltaTime), transform.position.z);
    4.             }
    with this:

    Code (csharp):
    1.             if (followTerrain)
    2.             {
    3.                 float lowestFoot = Mathf.Min(raycastHitLeftFoot.point.y, raycastHitRightFoot.point.y);
    4.  
    5.                 if (Input.GetButtonDown("Jump") && grounded)
    6.                 {
    7.                     takeoffHeight = lowestFoot;
    8.                     takeoffTime = Time.time;
    9.                     grounded = false;
    10.                 }
    11.  
    12.                 float flightTime = Time.time - takeoffTime;
    13.                 float jumpHeight = jumpSpeed * flightTime - 4.91f * Mathf.Pow(flightTime, 2f);
    14.  
    15.                 float positionY;
    16.                 if (jumpHeight + takeoffHeight < lowestFoot)
    17.                 {
    18.                     grounded = true;
    19.                     jumpHeight = 0f;
    20.                     positionY = lowestFoot;
    21.                     footIKWeight = 1f;
    22.                 }
    23.                 else
    24.                 {
    25.                     positionY = takeoffHeight;
    26.                     footIKWeight = Mathf.Clamp01(1f - (transform.position.y - lowestFoot) * 3f);
    27.                 }
    28.  
    29.                 transform.position = new Vector3(transform.position.x, Mathf.Lerp(transform.position.y, positionY + jumpHeight, transformYLerp * extraYLerp * deltaTime), transform.position.z);
    30.             }
    In script IK_Properties_AF, add this on line 91

    Code (csharp):
    1.         public float jumpSpeed = 5f;
    2.         float takeoffHeight;
    3.         float takeoffTime = -100f;
    4.         public bool grounded = false;
    It is the simplest of jump functions, but it is something for you to start from.

    The included RagdollControl may not handle all situations in your scene the way you want. If so you have to choose to either make a scene in which this RagdollControl is sufficient, or to do the work of building your own RagdollControl.
     
    Last edited: Aug 17, 2015
  7. fzd

    fzd

    Joined:
    Jan 30, 2013
    Posts:
    41
    Hi - I just purchased the asset - when is the update you mention going to be available on the asset store? Also, the webplayer demo has foot IK, but is this not included in the asset? thanks
     
  8. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Hi fzd
    I replied to your private message. I will send you the update, but I need your email address. Email me.

    The updated version has foot IK, shooting and smooth get-ups. I sent it to the asset store early this week. We are waiting for them to approve it.

    There is a new tutorial for the update here.
     
    Last edited: Mar 20, 2014
  9. fzd

    fzd

    Joined:
    Jan 30, 2013
    Posts:
    41
    I got the update, thanks for quick response!
     
  10. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    This is possible, but only with slightly lowered mimicking quality. Use this asset only on a few characters per scene.



     
    Last edited: Mar 20, 2014
  11. JOHNMCLAY

    JOHNMCLAY

    Joined:
    May 23, 2012
    Posts:
    38
    This is absolutely amazing! I'm a huge fan of Euphoria's capabilities and what you've done here with a combination of physics ragdolls and baked-animations is truly a great step forward in terms of character-animation in Unity!

    When my project gets to the death/ragdoll phase, consider me a customer! :D
     
  12. fzd

    fzd

    Joined:
    Jan 30, 2013
    Posts:
    41
    Hi - simple problem but...when I turn off the Foot IK script on the 'EthanMasterAF' char, the character goes stiff and falls over. What do I need to do to deactivate foot IK but keep the rest of the functionality?
     
  13. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    There are compiler directives (#define SIMPLEFOOTIK) in the top lines of the AnimFollow and RagdollControl scripts that need to be commented out.

    If you remove the SimpleFootIK script (not just disable it) you should receive a warning about the directives. I missed putting in warnings for a disabled script.

    Edit: I believe the easiest way is to remove the SimpleFootIK script and comment out the directives.
     
    Last edited: Mar 21, 2014
  14. JuanseCoello

    JuanseCoello

    Joined:
    Jun 9, 2013
    Posts:
    3
    I just bought the package and I love it, but i am also a programmer and i would want to edit the script to add more functionality, like turning, jumping, running, strafing left, strafing jump, climbing, like tomb raider, I know how to program everything, but this script is a little tricky, can you help me?
     
  15. JuanseCoello

    JuanseCoello

    Joined:
    Jun 9, 2013
    Posts:
    3
    I just bought the animfollow package and the foot Ik, but I have read that soon you will release a new version. Is there a possibility that you can send me the new version, because I just payed for the packages 100 dollars, I can show you some proofs that I have already purchased them by Paypal. Its because I have no more moner :( . My email is juansecoello@gmail.com just in case. Thanks.
     
  16. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Thank you Juanse
    Really pleased you like it.
    I can help you a little to get you started. May I first send you the updated asset? If you email me I will send it to you on google drive.
    There should be turning, walking and sneaking already. But maybe you mean you want to improve them and implement your own. That is very good, that was how I intended this asset to be used.

    Best regards
    Patrik

    Edit: I sent you the updated version.
     
    Last edited: Mar 22, 2014
  17. JuanseCoello

    JuanseCoello

    Joined:
    Jun 9, 2013
    Posts:
    3
    Wow thanks a lot!!! I am creating a third person character system by my own, and I have worked hard. But when I saw that there is a way to replace the character controller with the ragdoll armature I inmediatly bought it. I am planning to make a character (male), have the moves of tomb raider the old fashioned games, but more realistic, so there is a lot to do. I will gladly ask you some tips on scripting, and how to change the code. I have worked on the 3d buzz third person character system and added a lot of new functionality with a custom character, but now i am trying to import this character to the animfollow scripts, or to merge them. But I have seen this script and is kinda contradictory, I guess to avoid piracy. But I will take one year at least to dechiper it out without help. Since I speak spanish. By the way what is your mail so I can send you some things please? :)
     
  18. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Sounds like you are having a lot of fun.

    The scripts reflect that this is a fairly complex system. I will help you get started. Wait and you will receive a mail.
    Check out the tutorial here.
     
  19. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    I am sorry that the update is not on the asset store. I submitted the update early the 17:th of march. Yesterday I got a mail asking me if I wanted to update AnimFollow with the package I submitted, I answered yes, but nothing is happening. It is not declined, still pending, but not released.

    I am working on this asset now and yet another update is due in the near future.
    In the meantime, see the webplayers of my other assets (signature).
     
  20. Merire

    Merire

    Joined:
    Jul 29, 2013
    Posts:
    6
    Hello,

    I have a problem : I can't get the ragdoll to get up : http://youtu.be/3AwdMLzoYp4
    You can see it tries really hard with no success. I just used the prefabs to test, but I had the same problem with my model. Any idea ?

    Another suggestion : please prefix your scripts with "animfollow" to avoid conflicts, for example many projects already have a hashid script, maybe call it "animfollow_hashid".

    Still at v3 on the asset store. Maybe v4 will solve the problem ?
     
  21. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Hello Merire
    Thank you for your suggestions. In V4 I use better script names and the scripts are namespaced. I think the new version will handle your situation fine so let me send you the update on google drive. I need your email address so please email me.

    Your problem is that the old version only handled flat terrain at position y = 0.
    Remember to have all surfaces that the model is supposed to walk on, either named "Terrain", or have a tag listed as an ignoreTag in RagdollControl.
     
    Last edited: Mar 29, 2014
  22. Merire

    Merire

    Joined:
    Jul 29, 2013
    Posts:
    6
    Hello and thank you for the V4, it is great !

    I have a problem with the simpleFootIK now. With the prefab, it works correctly, and I can make the ragdoll work but with simpleFootIK, the feet of my models are acting weird. I can use animefollow if I disable the simplefootik (comment on the defines at the start of the animefollow script) but do you know what I'm doing wrong with the simplefootik ? I followed your video but I may have forgotten something.

    Here is a video of my problem (I have the problem with my models and with the unity robot kyle) :
    http://youtu.be/Y2GM_z00-_k
     
  23. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Glad you like it.
    I do not know what would cause that. It is likely just something small you have forgotten. I really have no time right now. I will contact you by mail tomorrow and we will fix this then, if you have not figured it out by then.

    Check the console for warnings.
     
  24. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Updated version is now released in the asset store and includes also foot IK. Try the example scene out in the web player.

    Youtube
    Web player
    Asset

    I am also working on the next update which will include a better character controller with walk, run sprint, jump, strafe, crouch and blending between them. Character will also fall from ledges and have petter performance.

     
    Last edited: Apr 1, 2014
  25. Markwayne

    Markwayne

    Joined:
    Apr 4, 2014
    Posts:
    1
    I like the asset very much and it's fun to use it. Now I tried to make a little fighting game and added some kick and punch animations like in Kavorkas Roundhouse Kick video. That looks great! My problem is, at higher speed, it gets unaccurate. How can i improve this. The "Enemy" is also very sluggish. Any ideas?
     
    Last edited: Apr 4, 2014
  26. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Yes, I know how to get better accuracy. The AnimFollow is already better accuracy than the "configurable joints only" solution. But it is somewhat tuned for performance as delivered, (next update will be even better performance). It will cost you some CPU and there are some limitations in physX, but I am confident that accuracy will not be a problem.

    Do this:
    1) The maxJointStrength is set too low, increase it maybe by a factor ten or more (in RagdollControl), you may have to increase the range of the parameter in both AnimFollow and RagdollControl). This might disturb some tuning in the getups, but that can be retuned.
    2) Put hands and feet on the ragdoll (extra rigidbodies, joints and capsule colliders). I always use that, it makes the ragdoll more realistic and prevents clipping. Plus it is advantageous because the force will help the torque. Remember the AnimFollow uses three different strengths.
    3) Set the fixed update intervall to 0.005 s (in all AnimFollow scripts), it will really make a difference. Now you can increase the PTorque and PForce.
    4) Fiddle with (in AnimFollow script) the PTorqueProfile, PForceProfile, the P... and D... values (2+2 values, write down the std. values) and maybe the mass distribution.

    This will surely give you great accuracy. Let me know how it goes. Maybe there is something else causing your problem (but try the above first). I had my ragdoll hold a gun that did raycast aiming pefectly stable even while in the sprint animation. The accuracy is there.

    Best wishes, I am very pleased you are having fun with AnimFollow!
    Patrik

    Edit: Have you downloaded the update that came live in the asset store only a few days ago?
    Make sure the ground is named "Terrain" or is tagged with an IgnoreMe tag.
    Try also to change the angularDrag, drag and jointDrag (in AnimFollow script). To high will cause lag and not high enough will limit usable P... values. (Do not change the D... values too much)
     
    Last edited: Apr 4, 2014
  27. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    For some models there is a bug in the foot IK, it does not matter for most riggings. I have a fix for it. Please email me if you are having a problem. Will be fixed in the next update.
     
  28. aspire9

    aspire9

    Joined:
    Aug 8, 2013
    Posts:
    45
    How difficult was it to make your little fighting game? So is it just adding animations and adjusting a few parameters?
    I'm not a programmer and still on the fence of buying this (90$ is pretty expensive for not knowing if i am able to handle the asset after buying)
     
  29. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    I cannot speak for Mark Wayne.

    I have had customers tell me it is fairly easy to read the code, and I have had customers tell me they would not dare touch anything.

    I want happy customers and am working hard to expand and improve this.
    I will not promise that everything in the code is easy.

    Patrik
     
  30. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    This was kind of fun.



    Download this script: http://pastebin.com/j3DWqe3R. Add it to the AnimFollow ragdoll. Tag the camera MainCamera. Toss the ragdoll in the air.
     
  31. Kale

    Kale

    Joined:
    Aug 25, 2011
    Posts:
    103
    Hah, that was pretty cool. The get upanimation looks much better now.
     
  32. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ooops posted in the wrong thread I think, but yes! Does/could this work well with FinalIK? Because that would be a beautiful thing
     
  33. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Thank you Kale.

    Lazygunn, I have a customer who have used this with both FinalIK and UMA. I have not tried it, but see no reason to believe that the customer was not telling the truth. You know that foot IK is already included in the AnimFollow asset?
     
  34. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I do know that foot ik is in there ive read a far bit of this and watched your videos (i love them), but i'd probably be using final ik's version, i wanted to use final ik (i already own it) for the 'sensible' interaction with the world, adapting animation with effectors to increase the sense of connection, and this looks like it would be perfect for adding a physical 'tactile' nature, like you might press the door bell of a door and final ik place your finger correctly, but the the door swings out quickly, which is where this would have you knocked over, perhaps over a fence behind you, fairly realistically and funnily.

    Same with running about, final ik could try and use its foot ik to place your foot on a high surface, but if its too high and you're moving too quickly you'll fall over it

    Do these scenarios make sense? It's also like above where you run into a wall, final IK would have you put a hand out to brace yourself but too fast and you'll still slam into the wall and possibly crumple. Thats how i was seeing it
     
  35. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Makes perfect sense. Will be a beautiful thing.
     
  36. Coder_lab

    Coder_lab

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

    Firstly I thank you for creating such a robust and useful asset, I love it so far.

    However, I was wondering if you could help me with a problem I'm scratching my head over?

    I believe it must be to do with how I create the ragdoll in the first place - once I've used the
    'replaceJoints' script on the ragdoll character, and finally attached the 'animFollow' script
    and assigned the master to it, I attempt to run the game.

    At this point, the console outputs the logWarning 'Rigidbody hips on (my character) is not
    connected to a configurable joint'.

    I followed your YouTube tutorial on how to create a decent ragdoll as exactly as possible,
    given my character's bone hierarchy is slightly different (see picture below - this screenshot
    was taken after creating the ragdoll, replacing joints, adding animFollow, assigning master
    character and running the game).



    I assigned the bones like this in the unity ragdoll wizard:

    Root: --> 'hips'
    Left Hips: --> 'l_thigh'
    Left Knee: --> 'l_knee'
    Left Foot: --> 'l_ankle'
    Right Hips: --> 'r_thigh'
    Right Knee: --> 'r_knee'
    Right Foot: --> 'r_ankle'
    Left Arm: --> 'l_shoulder'
    Left Elbow: --> 'l_elbow'
    Right Arm: --> 'r_shoulder'
    Right Elbow: --> 'r_elbow'
    Middle Spine: --> 'back1'
    Head: --> 'head'
    Total Mass: --> 80

    Upon testing the ragdoll without any components it displayed the expected characteristics
    (worked fine), so I proceeded to add the scripts...

    I understand what the logWarning is telling me, but I'm not sure how to add a configurable
    joint to my 'hips', as it expects a transform parameter that specifies exactly one other
    rigidbody's position. The hips, by definition, are attached to multiple rigidbodies so I don't
    know what to do.

    This second picture is a screenshot that was taken just after pressing play, it shows hips
    actually being assigned in the slave rigid transforms, not sure if that will help.



    Any advice you could provide is most appreciated,

    Best regards,

    nameis

    P.S I also sent an email, please disregard whichever message reaches you first :)
     
    Gametyme likes this.
  37. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Hello
    I am glad you like the asset.
    Thank you for a good, detailed problem report.
    When the character hierarchy is different there may be some fiddling to get it right. For your problem I suggest first trying to redo the ragdoll, but with the pelvis as the root in the ragdoll wizard. (Root should be highest in hierarchy)
    Then we continue from there. If all else fail, I'll set it up for you.

    Patrik
     
  38. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    Thanks for the swift and informative response Patrik, using the 'pelvis' as the root solved the problem!

    The console now displays:

    'Should you not assign some slaveExcludeTransforms to the AnimFollow script on (my ragdoll)'



    Is this due to the fact that I have commented out

    #define RAGDOLLCONTROL
    #define SIMPLEFOOTIK

    in the AnimFollow script?

    Thanks again for being so helpful!

    Best

    nameis
     
  39. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    I am glad for the progress.
    I think you have more warnings, because that warning is not a show stopper.
    My best tip now is to follow this tutorial exactly:

    Even if you want to do something else, start by making it work as in the tutorial and modify later.
     
  40. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    Thanks very much! I will follow your advice :)
     
  41. Coder_lab

    Coder_lab

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

    I have another problem sorry,

    I followed the tutorial on the updated version of animFollow linked above, and got right to the end without a hassle. The only warning I got was this:

    "Auto assigning of legs failed. Look at lines 32-57 in script IK_Setup"

    So I looked in there and realised the naming convention for my feet was different to Ethan's - I renamed my character's feet so that the script could find the correct strings for those transform positions and solved the problem.

    However, even though there are no more warnings in the console, my character's feet are acting strangely. I believe someone else had this problem earlier looking back through the posts. Maybe it's the same thing? I'm not sure how to modify the code in the IK_Setup (I think that might be where the problem is) to fix this. The character also disappears sometimes (seems to be related to it's position in the game world, something to do with layers?). Could you give me any advice?

    Here is what happens when I press play:

    http://www.gfycat.com/LankySneakyEasteuropeanshepherd#?format=gif

    Also, I would love to be able to use the AnimFollow script without any dependencies on other scripts. I totally understand that the other scripts are there to provide a more complete and compelling package, and to help people understand the basic uses of AnimFollow, but it just suits the workflow of my project better to add things one at a time.

    So would it be possible for you to explain how to modify the current version on AnimFollow to perform as it does in this video (seemingly works fine without any of the other scripts) or otherwise provide me with the original script?:



    I would be so grateful for any help you could provide, thanks again for such a cool product,

    nameis
     
  42. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Hello
    You must not rename the transforms, that will break the mecanim avatar!

    You could comment out the first row
    #define AUTOASSIGNLEGS
    at the top of the IK_Properties and IK_Setup. Then manual assignment of the legs becomes possible in the inspector.

    (Change by putting two slashes first like this
    // #define AUTOASSIGNLEGS
    and press F7 to complile. Then manual assignment becomes possible in the inspector.)


    The ragdoll and all its children should be on an ignored layer (e.g. water).


    Yes, I can fix so that the character runs with only the AnimFollow script.

    Comment out the top two rows in the AnimFollow script:
    // #define RAGDOLLCONTROL
    // #define SIMPLEFOOTIK

    and comment out line 317 and line 322 in the AnimFollow script:
    // #if RAGDOLLCONTROL && !SIMPLEFOOTIK
    void FixedUpdate ()
    {
    DoAnimFollow();​
    }
    // #endif

    Now you can (must) remove the components RagdollControl, SimpleFootIK and RagdollHitByBullet scripts in the inspector.

    But now the character will only work on flat terrain.

    The remaining scripts must be there for mecanim to work. If you do not use mecanim, then it is possible to remove those scripts too, but there will again be more warnings that have to be disabled.

    This should work, I just tried it.

    Best wishes
    Patrik
     
  43. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    Ah ok, I reverted the changes to the names and did what you said, this fixed part of the problem, as now the feet are stable. It didn't change the odd height problem though - the character still appears to be crouching on air. I tried changing the foot height manually using the same process you outlined above but it had no effect.

    If I uncheck the 'hide master' option, it shows the master moving about normally.

    I checked and double checked all the tags and layers of both the master and ragdoll of my character against their respective example tags and layers (ethan's), and they match exactly...

    Interestingly the 'air-crouching' behaviour seems to be dependent on the scene position, just like the disappearing parts of my character (although they don't occur in the same places).

    I am absolutely stumped. I started with a clean slate, fresh project with only AnimFollow imported, used the example scene and followed the updated tutorial second by second by watching the video.

    I really don't want to believe that the disappearing parts of my character are due to inverted normals or some other such bug, as the character has performed well in many other scenes with a large variety of animations, I just don't understand what is triggering the parts to disappear. If I use the example CompleteCharacter, everything works fine.

    I'm going to upload and post a short video of what is happening in the morning, hopefully clearer than the gif in my last post.

    Edit: Sorry for leaving you hanging till I upload the video, I just need to crash for a few hours so I can give you a semi-coherent idea of what is going on in my scene when I wake up haha :)
     
    Last edited: Jul 21, 2014
  44. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Ok. My current guess is that the problem lies in the difference in the character hierarchy. That might be tricky for you to fix. You may export the scene as an asset and send it to me on google drive.
     
  45. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    Sorry for long delay in replying, I'll play with the character hierarchy and look at the code to see what's happening, probably put in some breakpoints and step through to understand it better.

    Here it the video. It's in 1080p so you can see text better.

    EDIT: Forgot to mention that I turned off 'Hide Master', if anyone was confused about the two instances of my character. The instance that seems to be crouching is the ragdoll. When the ragdoll seems to disappear after the character runs up the hill, it is still in the scene, it's just that most of the character get hidden - only the gun straps on her holsters and her eyeballs are left visible (if you squint you can just barely see the gun straps after I shoot her the first time).



    That is a very kind offer, great support! I'll do my best to resolve it myself before resorting to sending it. Thanks :)
     
    Last edited: Jul 22, 2014
  46. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    It looks like the master foot IK is not working properly either. The foot IK is much nicer in my charachter, right? I wonder if your renaming is still cripling the system. The disappearing act, I have no clue, never seen that before. Do not worry about the stairs for now, they will work once the rest works.

    I am glad you soldier on by yourself. I will support my customers, but I am very pleased everytime I do not have to :)
     
  47. Coder_lab

    Coder_lab

    Joined:
    Jul 11, 2014
    Posts:
    20
    I'm fairly confident I've found the problem - I started over from scratch and paid more attention to differences between Ethan's hierarchy and my characters this time round. I discovered that the ragdoll generated by unity's wizard is VERY strange on my character's spine.

    Ethan's spine hierarchy is named thus:

    Spine -> Spine1 -> Spine2

    and my character's spine like so:

    Back1 -> Back2 -> Back3

    ...and so I noticed the first of my mistakes; when adding the additional rigidbody element (for the updated version of AnimFollow, which works better with 12), I mistakenly added it to Back1 instead of Back3.

    So I groaned, dragging my fingernails down my face in equal parts mirth and rage, and reached across for the mouse. It was time to fix this once and for all.

    BUT.

    It was not to be - another problem announced it's presence on screen, like the tolling of a bell. Dread unfurled claws in my belly. It was the swing of an axe upon my skin. It was the hot mindless rage of a thousand suns melting my hand on the mouse.

    Like a kick to the groin after being handed a box of chocolates.

    I paused. A breath caught in my throat, trying to fill my lungs but failing to reach them.

    My mind is racing right now, I'm not sure if this is nothing, or if this is heart of the problem all together:





    (Back2 is fine). These two transforms are wrong, I assume, because of the way the character was rigged. The third picture is what happens when I zero them out. So, my questions are:

    a) Will these actually cause problems, or was the problem more likely to have been caused by my first mistake?

    b) If they will cause problems, is there a work around by adjusting some values in code, or does the character have to be taken out of unity and re-rigged differently?

    EDIT: I worked through the decent ragdoll tutorial and the updated AnimFollow tutorial again, this time using the correct hierarchy for the spine. If anything, the problem seems worse now - movement seems to make the ragdoll follow the master with increasing instability until it flies off. Character parts still disappear. I am now almost certain the problem lies with my character's hierarchy. I will test AnimFollow on a different character now.

    I'm mostly posting stuff to this thread so hopefully others will benefit if they have similar problems - the lion's share of issues I've been having seem to be related to having a character with a different hierarchy to Ethan's, and not understanding how or why the scripts assign the rigidbodies as they do.

    In the meantime, I couldn't resist:

     
    Last edited: Jul 23, 2014
  48. FakePotato

    FakePotato

    Joined:
    Aug 24, 2014
    Posts:
    1
    This is GOLD ! and i also love the endorphin physics its just so good to look at !
     
  49. heyokwhy

    heyokwhy

    Joined:
    Aug 5, 2014
    Posts:
    2
    Hi Kavorka,

    I've just purchased your asset and I followed your tutorial videos, how to make a good rag doll and how to animate a rag doll with AnimFollow, but I seem to have a problem, I added the ReplaceJoints_S
    script and it added all the configurable joints, I then added the AnimFollow_S script and added the master in the inspector, but when I press play the master disappears and the rag doll just drops to the ground still in his T pose.
    And when I dont add the ReplaceJoints_S, I press play, and the ragdoll jump in a quite violent way, quite high, and then just fall.

    I tried manually to make the same hierarchy of your character but it did not work eather.
    Also, i had put all the getup animations and the parameters in the animator, but my charater just dont react.

    I have those message in the console :

    -Rigidbody abdomen on martyRagdoll2 is not connected to a configurable joint

    UnityEngine.Debug:LogWarning(Object)
    AnimFollow.AnimFollow_AF:Awake() (at Assets/AF_SFIK/AnimFollow/Scripts/RagdollScripts/AnimFollow_AF.cs:235)


    -Missing Script: PlayerMovement on martyMaster

    UnityEngine.Debug:LogWarning(Object)
    AnimFollow.RagdollControl_AF:WeHaveAllTheStuff() (at Assets/AF_SFIK/AnimFollow/Scripts/RagdollScripts/RagdollControl_AF.cs:477)
    AnimFollow.RagdollControl_AF:Awake() (at Assets/AF_SFIK/AnimFollow/Scripts/RagdollScripts/RagdollControl_AF.cs:145)

    -Layer for martyRagdoll2 and its children must be set to an ignored layer

    UnityEngine.Debug:LogWarning(Object)
    AnimFollow.SimpleFootIK_AF:Awake2() (at Assets/AF_SFIK/AnimFollow/Scripts/SimpleFootIKScripts_AF/IK_Setup_AF.cs:42)
    AnimFollow.SimpleFootIK_AF:Awake() (at Assets/AF_SFIK/AnimFollow/Scripts/SimpleFootIKScripts_AF/SimpleFootIK_AF.cs:10)

    -Auto assigning of legs failed. Look at lines 32-57 in script IK_Setup

    UnityEngine.Debug:LogWarning(Object)
    AnimFollow.SimpleFootIK_AF:Awake2() (at Assets/AF_SFIK/AnimFollow/Scripts/SimpleFootIKScripts_AF/IK_Setup_AF.cs:74)
    AnimFollow.SimpleFootIK_AF:Awake() (at Assets/AF_SFIK/AnimFollow/Scripts/SimpleFootIKScripts_AF/SimpleFootIK_AF.cs:10)

    Do you know why this would happen?

    Best

    Leo
     
  50. Kavorka

    Kavorka

    Joined:
    Sep 15, 2012
    Posts:
    247
    Hello Leo
    Sorry to hear you are having a problem.
    I have responded to your email.

    Best wishes
    Patrik