Search Unity

FINAL IK - Full Body IK, Aim, Look At, FABRIK, CCD IK... [1.0 RELEASED]

Discussion in 'Assets and Asset Store' started by Partel-Lang, Jan 15, 2014.

  1. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    Hi,

    Using VRIK, when I rotate my hand from palm down to palm up the system does not rotate the forearm so it ends up looking like this (pinched wrist):

    upload_2017-2-7_13-48-50.png

    I can't find a value to tweak that might correct this. How do I fix it?

    Thanks
     
  2. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    Hi again,

    I've run into another problem, I'm looking at implementing a grab. Your Grab.cs script has this:

    // Find MuscleCollisionBroadcaster that is a component added to all muscles by the PM, it broadcasts collisions events to PM and its behaviours.
    var m = collision.gameObject.GetComponent<MuscleCollisionBroadcaster>();


    Yet when I run my scene that component has not been added to any of the puppets' limbs. Each limb just has a JointBreakBroadcaster.

    I think it's down to this block in PuppetMaster.cs:

    if (behaviours.Length > 0)
    {
    muscles.broadcaster = muscles.joint.gameObject.AddComponent<MuscleCollisionBroadcaster>();
    muscles.broadcaster.puppetMaster = this;
    muscles.broadcaster.muscleIndex = i;
    }


    I haven't setup any behaviors. Why should a behavior be a requirement for this?

    Cheers
     
  3. Deleted User

    Deleted User

    Guest

    Is it possible to make a VR shooter with Final IK / VR IK without the need of animations since the animation will be done with the Touch / Vive controllers? Can you explain how Final IK with VR IK can help me out making a VR shooter game? Sorry I am a noob dont know too much about animation etc. I watched some gameplay footage of Dead & Buried with features VR IK and it looks nice, smooth movements. Would it be possible to make something like Onward VR (Unity game) with VR IK?
     
  4. Mr-Mallow

    Mr-Mallow

    Joined:
    Feb 26, 2016
    Posts:
    3
    Thanks for the explanations, Partel! It worked like a charm.

    Best,
    Mallow.
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey, your code seems to be correct but I'm having trouble reproducing this problem in the Grounder demo. I add this code to the root of the wolf and all seems to work fine when I rotate that transform.

    Code (CSharp):
    1. public GrounderQuadruped grounder;
    2.  
    3.     void Update() {
    4.         grounder.gravity = -transform.up;
    5.     }
    One question.. Do you have the Grounder component on the root of the character or a gameobject that is parented to it, like in the Grounder demo?

    Hey, that problem has been fixed already for the next version. Please PM me with your invoince number and I'll send you the latest right away if you are in a hurry.

    Hey,
    If you'd like FBBIK to behave like BipedIK, you can just set it's iterations to 0, you'll save a lot of CPU with that too.
    If FBBIK makes AimIK not work properly, it's because FBBIK solves after AimIK and messes up its aiming. If you make AimIK solve after FBBIK, it will be accurate. You can use the IKExecutionOrder component for that.

    Best,
    Pärtel
     
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    There is a component that can help with that, it's called TwistRelaxer. Please import this demo to check it out, find the TwistRelaxers on the forearm bones of the Pilot.

    Note that you can also adjust the rotation of the forearm bones like this:
    Code (CSharp):
    1. void LateUpdate() {
    2. forearm.localRotation = Quaternion.AngleAxis(twistOffset, twistAxis) * forearm.localRotation;
    3. }
    Hey,
    Good question. I'ts actually an optimization. MuscleCollisionBroadcasters have OnCollisionEnter/Stay/Exit declared so that will make things slower even if those functions were empty. That is why I don't want to add them unless there is a behaviour that uses them.
    You could make your grabbing code into a behaviour, using BehaviourTemplate as a template.
    Or you could just add the MuscleCollisionBroadcasters via script, just copy the code from PM.

    Hey,
    Yes, VRIK can help you with all the stuff you've seen in Dead and Buried, aiming, taking cover, strafing and turning. If you need your character to walk from A-B, you'll still need to use animation though. You can blend out ik.solver.locomotion.weight and use a standard 8-direction strafing blend tree to have the character follow the HMD.

    I'm working on new procedural locomotion, that could handle natural locomotion in room-scale and beyond, but it will take time, don't have an ETA yet.

    Best,
    Pärtel
     
    Deleted User likes this.
  7. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    103
    But the aimIK dosen't work with animator when fix transform is disabled!
    Any suggestions for that?
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey, what exactly do you mean by "doesn't work"?

    It should have either Fix Transforms enabled or Animator enabled. Something should just overwite IK results each frame, otherwise IK will solve additively on top of itself and that might accumulate to meaningless results over time.

    All Fix Transforms does, is rotate the bones to their default values (stored at Start) in Update(), just in case Mecanim will not overwrite everything when it updates.
     
  9. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    Hey Partel,

    Thanks for your speedy answers to my last 2 questions.

    I've another issue now. I have a VRIK driven character. So far so good. He stands straight and 'feels' okay even without much tweaking. I have been working on permitting the player to make fists by adding an animator with masks for left/right hand only. I can now make fists but with the Animator component enabled the character does not stand up straight - he always leans over at the hip (even when i am standing up straight). Like this:
    upload_2017-2-8_14-43-5.png

    (this is me standing up straight with the controllers shoved in my belt so i can press keys for a screeny)

    The animation masks just have the hands in green, but I get the same result if I enable the IK in the mask as well as the hands. He also assumes this position when i tested other random animation controllers.

    Changing the Animator Update Mode makes no difference.

    Any idea how I can correct this?

    Thanks
     
  10. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    489
    My setup is like this, Entity -> Model -> Grounder. Entity only rotates on the y axis, the Model rotates on the Z axis for flying, and then Grounder is a child of the Model.
     
  11. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    676
    Sorry if this has been answered already.

    Final IK is quite expensive on CPU. While the asset is absolutely amazing, it doesn't scale that well with a lot of characters. If each character has X performance cost, then the final cost will basically be number_of_characters * X.

    At Unite 2016, Unity showed off a C# job system where the performance was greatly improved. (In case you're interested, here's the demo.)

    I'm wondering how likely it would be that Final IK could be moved to such a system once it becomes available? Do you have any thoughts about this, @Partel-Lang?

    Thank you for your time.
     
  12. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    I'm using AimIK and LookAtIK on a character. When I change the AimIK setup at runtime to handle each specific kind of attack (aimIK.solver.target, aimIK.solver.transform , aimIK.solver.SetChain) the LookAtIK fails to work. (If I disable/re-enable the LookAtIK component while running, after it has failed, it starts working again).

    How to fix this?

    Thanks
     
  13. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    103
    When I enabled animator and disable fix transform in aim ik , the bone like the camera parented to head which are not controlled by animator aim at the target but other bones like spine go back to default position!
     
  14. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    103
    Can I get you on team viewer?
     
  15. nazbee

    nazbee

    Joined:
    Oct 5, 2016
    Posts:
    9
    Hi,

    Im testing the Mapping the Ragdoll demo and the movement of the character/ragdoll IK looks good at normal speeds, but if the target is pulled around too quickly it will freak out and spin around at crazy speeds. How can this be fixed?

    Is there a way to 1) limit or dampen so that it retains somewhat natural motion? and 2) lock the characters hand so that it is stuck 100% to the target even when moved around at high speed?
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    What does he look like when you disable IK? Do you have "Fix Transforms" enabled?

    Hey,
    Any chance you could package up that rig with an animation clip and send it to support@root-motion.com so I could take a closer look?

    Hey,
    I can answer that question when that job system becomes available. But if you have performance issues, I might have some suggestions for you if you told me more about what you need to do.

    Hey, have you changed the execution order of FIK components in the Script Execution Order?

    Hey, I can take a look at it on teamviewer or you could package up that rig and send a link to support@root-motion.com, probably easier to debug.

    Hey,
    It's just the ragdoll going nuts physically.
    Take a look at the "Idle Example" rig in that demo. The Target on this one has MotionTransfer.cs on it, it will transfer some of the motion of the target to the ragdoll so it would not be pulled that violently by the joint. The more you increase "Transfer Motion" value, the more stable it will get.

    Best,
    Pärtel
     
  17. nazbee

    nazbee

    Joined:
    Oct 5, 2016
    Posts:
    9
    Awesome, thank you
     
  18. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    If I disable IK he just stands in the t-pose and I'm able to clench/unclench fists as expected. Fix Transforms is enabled. I tried disabling it but it made no difference.

    (I've also noticed that when the animator component is enabled the TwistRelaxers don't work. Maybe that's a clue?)
     
    Last edited: Feb 10, 2017
  19. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    103
    Well I can allow for team viewer , email me at ruchirraj24@gmail.com when you are free, please ask between
    1200 to 1700 hours (GMT + 5:30) (I can use my PC at this time only)
     
  20. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    is it possible to use aimIK on multiple limbs simultaneously?
     
  21. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,611
    Hi,

    I'm using VRIK and I love it. I have an issue where one of the models I want to use is much taller and has longer arms than the user. It tracks motion fine but the arms and legs are bent even when the user stretches out to full size. Is there some way to account for the difference in model and player size?
     
  22. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    489
    I could do a screen share over Skype or something if that would work?
     
  23. JaceTwice

    JaceTwice

    Joined:
    Jun 29, 2015
    Posts:
    6
    Hello again, I've been using the LegIK package you gave me for a bit now and your example scene behaves exactly the way I'm looking for! However I can't seem to get my own character working as nicely.

    The problem is in the toes. Any time I rotate or move the rig in such a way that will bend the toes, they'll get stuck in bent position and not move back to their resting angle. The heel offset controls are also extremely sensitive and sometimes have a momentum of sorts where the bones will continue moving for a moment after I've stopped scrolling the value.

    I've triple checked and I've made everything as close as possible to your example, barring two differences. My character's skeleton is not a full humanoid and only has the bones that make up the legs (pelvis, thigh, calf, foot, toe). Therefore I'm using a generic unity animation rig rather than their humanoid one. Additionally my animator component has no animation states in it, as I'll be doing all of my animation on the rig procedurally. Does any of this sound like it might cause these issues? Does VRIK (and by extension the LegIK component) require a humanoid rig to work?
     
    Last edited: Feb 11, 2017
  24. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    103
    Hey! Problems Solved :D:D:D:)
    And by the way can you give me the leg ik also(one that is metioned in the above post by"JaceTwice")?
     
  25. JaceTwice

    JaceTwice

    Joined:
    Jun 29, 2015
    Posts:
    6
    It was actually posted publicly in one his replies to me here on page 47. For convenience sake though here's the part with the link!

     
    Partel-Lang likes this.
  26. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    I just discovered this forum, and I found a question I can answer! :)

    Here's a little one-line trick I've used on a few projects:

    animator.GetBoneTransform(HumanBodyBones.Head).localScale = Vector3.zero;

    Note -- if you're creating a multi-player game, you should only do this on your own avatar (since the other players may be distressed by seeing a headless avatar wandering around).

    Also note that your head will not probably be visible in mirrors (depending on how you implement the mirrors, of course).

    Anyway, hope this helps.

    (I'll soon have a question of my own...)
     
    Last edited: Feb 11, 2017
    Partel-Lang and chelnok like this.
  27. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    I have a strange problem.

    I'm using VRIK (which is amazing, by the way!). Head and hands are working well.

    However, my avatar's feet are too far apart:

    upload_2017-2-11_17-35-58.png

    As a result, when I try to crouch down, I get this:

    upload_2017-2-11_17-37-14.png

    I've tried adjusting the foot spacing in solver.locomotion to a smaller value. It works (i.e. my legs are parallel when I'm standing), but then when I crouch I get this:

    upload_2017-2-11_17-39-36.png

    ... which is very odd. Am I missing something?
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    I noticed the root of the character is way behind him in that screenshot. Are you using some sort of locomotion, could you send me a screenshot of the VRIK component with everything expanded?

    No, but you can use another AimIK for the other limb. Just keep in mind that (if you are aiming hands) the other AimIK must not have any bones assigned that are common parents for both arms (spine bones), otherwise it will mess up aiming of the first AimIK. So, in short, make a primary AimIK component, assign spine bones and primary arm bones. Then make another AimIK and assign only secondary arm bones. Make the other aimIK solve last (IKExecutionOrder.cs).

    Hey,
    For taller/shorted players you can just scale the model. As for different arm proportions, the easiest way to adjust that would be to multiply the localPositions of the forearm and hand bones in LateUpdate. VRIK will adapt to that.

    Hey,

    A screen recording would probably do the same, if you can do that, so no need to schedule a skype.

    Hey,
    It's probably just that there is no animation overwriting IK and it will solve additively on top of itself frame by frame.
    You should check "Fix Transforms".

    Hey, clever tip, thanks for sharing! :)
    You can also just move the camera out of the head, right in front of the eyes, like in this tutorial video.

    Hey,
    Have you tried adjusting "Swivel Offset" for the legs in VRIK?
    Also, using another base animation might be good. If you are not using any animation at all, just rotate the knee bones in the Scene View, so the knees would be bent slightly in their natural bending direction.

    Cheers,
    Pärtel
     
  29. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    The swivel offset is interesting... if I adjust those values a bit, I get this...

    upload_2017-2-13_17-38-4.png

    ... which is better, but still looks awkward.

    The IdleShort animation I'm using just has the character standing there with his feet together and nothing moving. I'm scratching my head trying to figure out what's forcing the feet apart.
     
  30. JaceTwice

    JaceTwice

    Joined:
    Jun 29, 2015
    Posts:
    6
    hmm, unless I'm missing something the LegIK component has no Fix Transforms option. I see it availible on some of the other IK solvers but have no idea how I'd activate it via code on the LegIK.

    ss+(2017-02-13+at+11.29.23).png
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey, can't you get them closer together by decreasing "Foot Distance" in locomotion?

    Hey, that's because it was not a proper FIK component yet, just a quick implementation of VRIK's leg solver in a monobehaviour. Anyway, I've done some work on it, please delete the old LegIK and import this package.

    Best,
    Pärtel
     
  32. ShaneTheVeryTall

    ShaneTheVeryTall

    Joined:
    Nov 28, 2009
    Posts:
    11
    Hello! I'm having some trouble figuring out the best way to go about a setup with a dinosaur (brontosaurus). Here's what I'm looking to achieve:

    1. Brontosaurus looks at a piece of food (Using AimIK for this) for a few seconds.
    2. Then Brontosaurus uses CCDIK on neck and head bones to move its head to the food object (while AimIK weight is still = 1).
    3. Bronto's eye bones look at the food (I'm using a basic transform.LookAt() in LateUpdate for now)

    So far everything seems to be fine except for the transform.LookAt() with the eye bones so I have a few questions and one specific problem:

    Q1: Is it okay to use CCDIK and AimIK on the same character (same neck and head bones)?
    Q2: Am I taking a good approach with Final IK or should I be doing something different?

    My main problem is that since Fix Transforms is checked on AimIK, the eye bones can't update their rotations in LateUpdate while the IK animation is happening (whlie the bronto's neck is solving CCD and Aim)... I'm guessing this is expected to happen, but is there a way I can override that to get the eyes to stay fixed on the target?

    Also, it seems that if I don't have Fix Transforms checked on AimIK, the procedural animations for CCD and AimIK play really fast (or the smoothing curve is super fast) and it seems to break my code. I'm using Mathf.SmoothStep to change the weights for each IK solver over time:

    Code (CSharp):
    1. IEnumerator SmoothMoveIK (float start, float end, float seconds, float delay) {
    2.             yield return new WaitForSeconds (delay);
    3.             float t = 0.0f;
    4.             while (t <= 1.0f) {
    5.                 t += Time.deltaTime/seconds;
    6.                 ikSolver.solver.IKPositionWeight = Mathf.Lerp(start, end, Mathf.SmoothStep(0.0f, 1.0f, t));
    7.                 yield return null;
    8.             }
    9.         }
    10.  
    11.         IEnumerator SmoothMoveAimIK (float start, float end, float seconds, float delay) {
    12.             yield return new WaitForSeconds (delay);
    13.             float t = 0.0f;
    14.             while (t <= 1.0f) {
    15.                 t += Time.deltaTime/seconds;
    16.                 aimIKSolver.solver.IKPositionWeight = Mathf.Lerp(start, end, Mathf.SmoothStep(0.0f, 1.0f, t));
    17.                 yield return null;
    18.             }
    19.         }
     
  33. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    I'm not using any locomotion other than that which comes as default with VRIK. Here is the setup: I hope it helps!

    upload_2017-2-15_14-23-29.png

    upload_2017-2-15_14-24-18.png
    upload_2017-2-15_14-25-34.png
     
  34. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    I forgot, just in case it helps, here's the character setup:

    upload_2017-2-15_15-59-55.png
     
  35. JaceTwice

    JaceTwice

    Joined:
    Jun 29, 2015
    Posts:
    6
    This works perfectly! all it took was a couple little edits and now my characters are running very smoothly. Thank you again for all the help, I can finally get back to making real progress now.
     
  36. ColtonK_VitruviusVR

    ColtonK_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    146
    Hey @Partel-Lang,

    We are going to be getting our main character rigged shortly and I was wondering if there is anything I should tell the rigger to get the best results from VRIK (Extra helper bones? Where to focus weight painting? etc.)? Or is an anatomically correct human fine? (We are mostly worried about the bending/twisting wrists).

    Cheers,
    Colton
     
    Last edited: Feb 17, 2017
  37. jasonoda

    jasonoda

    Joined:
    Sep 7, 2012
    Posts:
    64
    Hey Final IK folks. I previously wrote this post:

    I am randomly getting the:

    "Invalid IKEffector.positionOffset (contains NaN)! Please make sure not to set IKEffector.positionOffset to NaN values."

    maybe once out of every 10 times I play. Is there something in the settings that could be throwing this off? I'm using this with a full body biped ik. I use almost all of the default settings provided. The only thing I have that might be out of the norm is a script that frequently changes the weight of grounder from between 0 to .9. When this gets messed up my character either disappears or the limbs are pointed in crazy directions.

    Do you have any advice as to how to fix this? Do you know what typically causes this? Can I just set the positionOffset to Vector3.zero to alleviate this?


    I was told that turning the script off while the skinnedMeshRenderer was on would fix this problem, but it did not. I also have fix transforms turned on. It's actually started to happen more often now. Almost every time at this point. I'm surprised this isn't a more common problem.

    Is there anything else you can think of that would fix this?

    Is there some kind of a patch you can give me really quick to reset everything if this warning goes off? I only know javascript and trying to hack one through is a bit above my skill level in C#.

    Also, it would be great to include it in future versions.
     
  38. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    97
    I'm using VRIK with a gameobject tracking the head, and gameobjects for each hand bound to 1 controller. The other controller is in the back of the belt, with an empty game object bound to the pelvis target. I'm trying to controll lower body rotation with a vive controller in the back of my belt bound to it, but no matter what position weights I set on the spine, I can't get the lower body to rotate with the pelvis bound to that controller.

    Part two is i'm trying to get a forward vector off the pelvis once its rotated the same as the vive controller.
     
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hi!

    The problem with the eyes is that you rotate them with Transform.LookAt in LateUpdate, that is before CCD solves. So after CCD has solved, the eyes are not where they were anymore so they will not look in the same direction anymore. You'll have to add that eye script to the Script Execution Order to a higher value than CCD has.

    Hey,
    Looks alright, can't see anything wrong with that. Could you make me a repro or something I could take a look at? Otherwise it's just a lot of guesswork and will take a lot of time.

    Hey,
    Any rig should be fine. As for the wrists, would be good to have twist bone in the forearms. You can use the TwistRelaxer component to improve twist rotation after VRIK has solved. Just add a TwistRelxer to the twist/forearm bones, assign parent, child and the axes, it will even out the twist rotation of the bone between the parent and the child. A demo will be included in the next version coming soon..

    Hey,
    Could you send me that chunk of code that sets positionOffset?
    IK sets positionOffset to Vector3.zero after each update, so there must be something unsafe with the way positionOffset is set.

    Hey,
    I have already added "Pelvis Rotation Weight" to VRIK that can probably be used with that. I'm currently in France, will come back on thursday so if you PM me, I can give you a link to the latest by then.

    Cheers,
    Pärtel
     
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hi All,
    I'm in France until next Thursday and I just realised I can't send any mails through my server here so if I have not responded to support@root-motion.com or contact@root-motion.com, please write here or send me a PM.

    Best,
    Pärtel
     
  41. jasonoda

    jasonoda

    Joined:
    Sep 7, 2012
    Posts:
    64
    Hey,
    Could you send me that chunk of code that sets positionOffset?
    IK sets positionOffset to Vector3.zero after each update, so there must be something unsafe with the way positionOffset is set.


    I haven't changed anything in the core code of final IK. All I have is a player control script that frequently adjusts the GrounderFBBIK weight variable. Once this warning goes off the limbs go crazy and never return to normal. I would just put in a patch to destroy the player and recreate it, but I don't have the savy to figure out how to do this within the final ik code.
     
  42. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    66
    I've emailed a package for you to see exactly what is going on. Thanks!
     
  43. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    After more investigation, I've found something interesting. If I disable the Animator component, or have no AnimationController specified in it, everything works fine. The footDistance I specify works perfectly, no problems when I crouch or take a few steps in any direction.

    However, with the Animator component enabled, I get the problems I was describing.

    I've double-checked, and the Idle animation I'm using is literally just the character standing there with his feet side by side not doing anything. Not sure why having this enabled would cause problems.

    I definitely need the Animator, since I have forward and backward walking states (I disable locomotion while in those states) and I have hand animations on a separate layer (with a correct animation mask).

    I have "Foot IK" and "Write Defaults" set in the Idle animation. I have Apply Root Motion set on the Animator, with Update Mode Normal and Culling Mode Always Animate.

    Not sure where the problem might be.
     
  44. tavovallejo

    tavovallejo

    Joined:
    Nov 22, 2014
    Posts:
    13
    hello, is there a way to use Rotation Limit Angle component with LimitTwist = 0 without the flip at the z axis, if not, use LimitTwist = 180 but make it have some memory of the original z axis rotation.

    i need something that behaves similar to blenders Damped Track constraint.

    This turret has only one Rotation Limit Angle component in the Pitch gameobject the others were deleted.

    I do not have much experience with Quaternions yet, and using eurles always glitched out.

    srry my english

    upload_2017-2-18_18-50-39.png
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    Until I can reproduce, if you change that Debug.LogError in IKEffector.cs to "positionOffset = Vector3.zero", does it fix it?
    Any chance you set GrounderFBBIK.weight to NaN due to division by zero in the calculations somewhere?

    Hey, did you try decreasing "Foot Distance" in VRIK Locomotion settings? I think you did before, you had problems with crouching then, but now that you are using swivel offset, it should be ok to decrease it.

    Hey, sorry, didn't quite understand, what you meany by "without the flip at the z axis".
    Blenders' Damped Track constraint is basically a Transform.LookAt. If you need it to be limited, you can use transform.rotation = Quaternion.RotateTowards(initialRotation, Quaternion.LookRotation(target.position - transform.position), maxAngle);

    Cheers,
    Pärtel
     
  46. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    I did reduce the Foot Distance, and it worked great even without setting the swivels. The problem is that all of this only works without an Animator. When the Animator is active, I can't find any combination of Foot Distance and Swivel Offsets that work correctly.

    Is there anything special I need to do in VRIK if I have an Animator?
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Can you send me that animation clip and the character model so I could take a look. There should not be anything special you need to do to have an active Animator.
     
  48. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    67
    Okay, I'll send them along. Thanks!
     
  49. bannerbruce

    bannerbruce

    Joined:
    Feb 22, 2017
    Posts:
    2
    how to rig finger,if i press the trigger or grip:)final ik is a awesome solution.
     
  50. bannerbruce

    bannerbruce

    Joined:
    Feb 22, 2017
    Posts:
    2
    i use ik for a charactor without hand animation