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. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    If you leave the Animator slot empty in EditorIK, then it won't update the Animator and you should be free to record your keyframes without animation messing it up.

    Hey,
    The recommended solver for VR is VRIK. FBBIK has a head effector hack (see the "Head Effector" demo), but that really is a quick hack I made to support VR before I created the dedicated VRIK component. But if you find FBBIK better for your particular use case, of course, feel free to use that. VRIK is about 2-3 times faster though.

    Hey,
    I see, that is much more complex... I can think of a few ways to try with FBBIK and AimIK, but they all would probably be too much work to make it worth your while. It would be easier if you had 2-3 animations: swing low, middle and high, choose between them based on target pitch. Then it would be easy to solve the yaw offset with AimIK.

    Hey,
    Could try these things:

    Simply make the animation slower. Can add a parameter to drive animation state speed.
    If simply reducing speed won't make it look heavy, can use an AnimationCurve and animatorstate normalizedTime to drive the speed parameter:

    Code (CSharp):
    1. public AnimationCurve heavyAttackSpeed;
    2. [Range(0f, 1f)] public float currentWeaponMass;
    3.  
    4. void Update() {
    5.     var info = animator.GetAnimatorStateInfo(0);
    6.  
    7.     float attackSpeed = 1f;
    8.  
    9.     if (currentWeaponMass > 0f && info.IsTag("Attack")) {
    10.         float n = info.normalizedTime;
    11.         n -= (int)n; // looping 0 - 1
    12.        
    13.         float attackSpeed = heavyAttackSpeed.Evaluate(n);
    14.         attackSpeed = Mathf.Lerp(1f, attackSpeed, currentWeaponMass);    
    15.     }
    16.     animator.SetFloat("AttackSpeed", attackSpeed);
    17. }
    With that script attack animations should be tagged with "Attack" and should also have an "AttackSpeed" parameter in the Animator assigned as Speed Multiplier parameter of all the attack states.

    So heavyAttackSpeed defines attack animation speed per normalized time. If it's a flat curve of value 1, then the animation will play as normal. You can reduce the value at the beginning of the curve to make the lifting of the heavy axe slower, increase at the end to make it hit faster.

    currentWeaponMass is the weight of the effect. 0 would have no effect, 1 would have the full effect.

    But on PuppetMaster's side what you could try is this:

    Reduce pin and muscle weights for the arm and prop. use muscle.props.pinWeight and .muscleWeight for the arm and "Muscle Props" in PuppetMasterProp for the prop. Also can try increasing muscleDamper.

    Cheers,
    Pärtel
     
    fengkan likes this.
  2. ThibaultArtefacto

    ThibaultArtefacto

    Joined:
    Mar 12, 2020
    Posts:
    5
    Hi Partel,

    I'm trying to combine Full body biped IK and VR IK.

    Full body biped IK to track a full body (I receive Target Poses, and with target I move my avatar) and VR IK to track Head and Hands with Oculus Integration (using Oculus Hands like target).

    Full body works perfectly, thanks for that.
    VR IK alone too.

    But combining both has a problem on Head. My CameraRig is detach from the body. Have you a hack or an idea on How can I fix this ?

    I move my Camera Rig at the eye position of my avatar, but when I build and Run ...problem... ^^
    I try your Head Effector hack too, but not work for me.
    Thanks
    Thibault
     
    Last edited: Jul 28, 2020
  3. msmsm

    msmsm

    Joined:
    Feb 1, 2014
    Posts:
    49
    Hi,

    I am actually having some good success with FBBIK effectors and doing stuff similar to the animation warping example. Will let you know how it goes!
     
  4. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    41
    Hey @Partel-Lang! Hope all is well! I have a weird issue with VRIK. My OVRCharacterController could be walking up a ramp, yet the body only walks on ground, thereby detaching from the camera. While this is actually a pretty cool effect, especially when I jump down and land perfectly in my body, it's not what I want. I remember reading earlier in the forum that it will always walk on a y of 0. I was wondering if I could somehow change that?
     
  5. msmsm

    msmsm

    Joined:
    Feb 1, 2014
    Posts:
    49
    Just as a follow up to this; I took a step back and with having more understanding about how finalIK works, from messing around with the different bits, implemented this quite easily by having the aim transform map to the shoulder, ramping up the weighting when winding up the stroke and using the offset logic as found in the swing example video. It works amazingly, thanks for such a great product!

    Just need to use the FBIK to put the left hand back and add a bit of leg bend on the lower swings now.
     
  6. msmsm

    msmsm

    Joined:
    Feb 1, 2014
    Posts:
    49
    I did have one question. Is there a way to lock the feet in position so I can lock feet, rotate the hip transform and have the legs bend rather than the feet move?

    Edit: actually I guess this is a similar problem to putting a hand back on the weapon, i.e I need to rotate hips then call legIK or similar to solve having locked the foot to position. I will give it a try and see where I get to
     
    Last edited: Jul 30, 2020
  7. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Is it possible to retrieve the position of the next step via the grounder script?

    I'm trying to establish whether the the character is about to go down a step or up one. Rather than do more raycasting and all sorts of other sampling, can I pull this via FinalIk?

    If so, where should I be looking? :)
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    The head detaches because VRIK solves before FBBIK. So using FBBIK hand effectors might pull the head away from where it was put by VRIK. You can add the IKExecutionOrder component, drag FBBIK first and then VRIK to it's IK list to reverse the update order.

    Hey,
    It won't always walk on a y of 0. It just won't move the root of the character vertically. You'll need either a character controller with a capsule collider and a rigidbody or just raycast from the character's position down and move the root to hit point y.

    Hey,
    Yes, can do that with LimbIK:
    Disable LimbIK component in Start():
    Code (CSharp):
    1. leftFootIK.enabled = false;
    In LateUpdate(), first store the animated positions and rotations of the feet:
    Code (CSharp):
    1. leftFootIK.solver.IKPosition = leftFootIK.solver.bone3.transform.position;
    2. leftFootIK.solver.IKRotation = leftFootIK.solver.bone3.transform.rotation;
    . Then rotate the hips or run another IK solver or whatever.
    Finally, just update the LimbIK:
    Code (CSharp):
    1. leftFootIK.solver.Update();
    Hey,
    No, sorry, Grounder has no idea where exactly the foot will land. But you can access Grounder's raycasting data like this:
    Code (CSharp):
    1. grounder.solver.legs[0].GetHitPoint()
    0 is left leg index, 1 is right leg. If hit.point.y is higher than character root.y, then I guess you'll be going up.


    Best,
    Pärtel
     
    Zante and ThibaultArtefacto like this.
  9. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    65
    Hi,

    I am using VRIK and I just want to make sure what I am trying to do makes sense, or if there is a better way to do this.

    I want to have a VRIK rigged character about 2m in front of the XRRig. Basically I am asking the player to stand in a T pose and I want the VRIK character to match the players movements as they get into a T pose.

    The first incarnation of this, the VRIK character moves to the XRRig location. My next incarnation I am going to put targets in the rig, but have them 2 meter ahead. I think that should keep the VRIK character 2 meters in front.

    Does this make sense? I also assume if I change the locomotion weight to zero the VRIK character will not move?

    UPDATE: the head target works perfect, the arms, not so. Any sort of offset that large on hand targets makes them wonky and don’t react right. Have to think in this some more. Also setting locomotion weight to zero works as hopped.

    UPDATE 2: I lied, the head target does not work perfect. I found if I squat and look up, I can get the VRIK to be full height. Not what I want. All I want is the VRIK character to react to the XRRig like normal, but 2 meters in front, would not think it’s that hard but obviously I’m missing something here.


    thanks
     
    Last edited: Aug 1, 2020
  10. pizzaboy13

    pizzaboy13

    Joined:
    Mar 6, 2019
    Posts:
    18
    Hi Partel,

    I understand that there is no way to pin the knees and elbows on the FBBIK.

    I want to have a go at implementing this myself.

    How difficult/complex would this be? How would you go about doing it?

    Thanks
     
    Last edited: Aug 1, 2020
  11. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    41
    Thanks
     
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    If you can't move the tracking space as the camera would move too.. You could make duplicates of the IK targets and unparent them from the XR rig. Then use a script to drive them to the original targets with 2m offset:

    Code (CSharp):
    1. transform.rotation = target.rotation;
    2. transform.position = target.position + Vector3.forward * 2f;
    Hey,
    Probably more complex than you'd expect, I mean if I knew how to go about it, I would have already implemented it from my side. Can you tell me more about what you are trying to do with the elbow targets? I might have an alternative suggestion for you.

    Cheers,
    Pärtel
     
  13. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    65
    And this is why your the expert!

    I got too bogged down trying to get VRIK to do something it’s not design to do that I missed the simple and obvious solution of doing exactly what just you said.

    Thanks

     
  14. BenMM

    BenMM

    Joined:
    Jan 28, 2019
    Posts:
    16
    Hi Partel,

    i have a question in regards to the FABRIK Final IK Chains. I have two hierarchically septerate bone chains in these tubes (see the images). One coming from the shoulder to the measuring device and one from a gasmask also towards the measuring device (Both Chain end bones being in the same position).
    This will be used in VR and the measuring device will be represented by a VR tracker which the player can grab and move.The chain attached to the gasmask is also influenced by headmovement.



    The issue i am having is not being able (I feel like im just missing something) to fully constrain the endpoint of the gasmask chains endpoint to the position it is attached in the right image above.
    Is my aproach a good way to go and is there a way to fully constrain one chain enpoint/target to another chains endpoint/target?



    This is what i usually have happen.
    They are currently both using a Gamobject as target that i move around (while testing without being in VR).
    The issue also being that the shoulder chain is rather short in comparison to the gasmask chain, making it even more important to have a full contraint.

    Hope my question is clear enough.

    Thanks for the active engadgement in the Forum, its quite interestingto see all the different questions and solutions.

    Cheers
     
  15. kerede

    kerede

    Joined:
    Apr 3, 2013
    Posts:
    9
    Hi Pärtel,

    Is it possible to use VRIK to only solve the arms and legs? I'm attempting to layer a full body avatar over the Oculus avatars, which include a head and chest. I need the head and chest of the VRIK avatar to stay fixed while the arms and legs move freely. Would it be more efficient to use limb IK here? Thanks!
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Looks like in the last screenshot the chain is just unable to reach. If the measuring device is what you will be able to move, it would be better if both chains started from that, I mean all the bones would be parented to the measuring device. Basically invert the chains if possible. The tube would then lose contact with the gas mask if pulled too far. That could be fixed by stretching the tube, just locking the last bone to the gas mask post-IK or by making sure the measuring device does not move beyond chain length from the mask.

    Hey,
    Yeah, if you only need to solve arms and legs, use either LimbIK for all or use ArmIK and LegIK. ArmIK and LegIK are actually just wrappers for VRIK's limb solvers so the behaviour should be exactly the same.

    Cheers,
    Pärtel
     
  17. LNMRae

    LNMRae

    Joined:
    Dec 28, 2012
    Posts:
    48
    Hi, I've been messing with Final IK trying to get a particular behavior and I'm wondering if there might be a simple way to accomplish this that I'm just not thinking of.

    The behavior I'd like is basically the Look At IK, but reversed. Instead of the character's head following the object, I'd like them to look away from it.

    Using playmaker, I've tried using the position of the gameobject I want the character to look away from and reversing the Vector 3, but as I found that doesn't quite work since the location of the object varies too much in world space and it creates some odd behavior.

    I'm not great with code, but would it even be possible to edit the behavior of the Look At IK to reverse the behavior? Or would I be better off trying to use a different type of IK all together, like the Aim IK?

    Thanks!
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,

    Did you reverse the position of the target or the direction towards the target?

    Should be like this:
    Code (CSharp):
    1. Vector3 targetDir = target.position - ik.solver.transform.position;
    2. ik.solver.IKPosition = ik.solver.transform.position - targetDir;
    Best,
    Pärtel
     
  19. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello,
    I don't know how to set "Grounder Full Body Bidped" to prevent weird legs rotations and position changes during various animations. I've tried to change randomly various settings, but that's probably not the way to go :) If character is standing, walking or running it's ok, but once some combat animation involving legs starts it is messed up if Grounder is enabled.
    I should probably note that I use DAZ characters and FullBodyBipedIK limb orientations are set to UMA:
    Code (CSharp):
    1. ik.solver.SetLimbOrientations(BipedLimbOrientations.UMA);
    And after FBX import I rotated knees back and forward so the orientation is correct (enclosed screenshot).

    Video:
     

    Attached Files:

  20. LNMRae

    LNMRae

    Joined:
    Dec 28, 2012
    Posts:
    48
    I'll give this code a try when I get the chance, thank you!
     
  21. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    Not sure how to explain but by setup the player gun rotates to a mouse cursor target and fires directly to the mouse. However when moving the player it doesn't aim properly. No clue??
     
  22. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117

    Hi ShotoutGames!

    Maybe some examples of your code and images would be good so it's easier to understand what's going on =)

    Warmest regards,
    Gabriel.
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Would you mind sending me that model fbx and one of the animations that the problem occurs with?
    Can use support@root-motion.com or PM.

    Hey,
    Is it jittering or is it lagging behind or is it just aiming in the wrong direction? If you could record a video perhaps that would help me understand better.

    Best,
    Pärtel
     
  24. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    Thanks Partel,
    I sort of figured it out as it was not a true FinalIK issue. The movement of the player is not allowing the bullets themselves to start at the initial proper direction even though the player aimik is lined up properly with the crosshair.
    Not sure I get it all so I had to basically hack it by adding the movement speed of the player to the velocity of the bullet to compensate.
     
  25. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Hi Partel,

    How can I make object look heavy when I'm lifting them using VR.

    Per example, in the Boneworks or Blade and Sorcery, the heavier the object, the more the VRIK acts like it.

    Warmest regards,
    Gabriel.
     
  26. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Could be that you were spawning the bullets before AimIK had updated, so they still emitted from the pre-aimed position of the muzzle. Please check this answer.

    Hey,
    That is not done with IK. It is done with actual physics. Just 2 rigidbodies for your hands that are driven by AddForce or joints. There is an example about that in PuppetMaster, under the _Integration folder there is the "VR Boxing" example (requires Oculus plugin). The DynamicAnchors used there to drive the hands is what you should be looking for.
    In Blade & Sorcery and BoneWorks IK is applied on top of that just as cosmetics, the full body has no physical presence, it is just the hands.

    Best,
    Pärtel
     
  27. Futwerk

    Futwerk

    Joined:
    Jun 21, 2020
    Posts:
    6
    Hi @Partel-Lang
    VRIK calibrator makes the arms of my avatar too short for my purposes, so I'd like to calibrate from user T-pose, and use that to calculate arm length. Would this involve editing just the VRIKCalibrator.cs, or would doing that mess up the ik solvers? I was just going to use the armspan to scale the avatar along the X, and use the height calculation to scale the Y and Z.
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    VRIKCalibrator doesn't calibrate arm lengths at all. You can do that after calling Calibrate though. You can use ik.solver.leftArm/rightArm.armLengthMlp. For example you could ask the player to stand in T pose, then compare the "wing span" of the controllers to the wing span of the avatar and adjust armLengthMlp accordingly.

    Best,
    Pärtel
     
  29. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Are there known issues with using "Enter Play Mode Options" without "Reload Domain" or "Reload Scene" for faster play mode entering? When we have this enabled, I'll randomly get a null reference exception in `InteractionEffector.cs`'s start method. `effector.bone` is null, but the issue goes away when I turn off the fast play mode entering.
     
  30. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    Hey guys i am trying to use the aim IK to aim where the camera is looking so far I've been able to get my guy to aim at a gameobject (sort of at least):

    upload_2020-8-21_0-9-9.png

    My question is how can I move the gameobject with the camera and ensure that he is always aiming with the camera direction and position?
     
  31. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Is your game first person, or with the camera behind the character, resident evil style or is it top down?
     
  32. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    its a thrid person game with the camera behind the character
     
  33. VirtualWorldArcade

    VirtualWorldArcade

    Joined:
    Jun 29, 2017
    Posts:
    7
    I have a strange use case for your IK and have come upon a strange quirk introduced when spawning 100+ Root motion VRIK bodies. I've set all the targets for the IK to be roughly the same position, but some of the IK solvers get stuck, such that the model gets stuck mid animation from flying from their spawn position. I then tweak the position weight for the head or hands from 1 to near 0, then back again, and the body gets the position correctly.



    I was wondering if you can explain this phenomenon?
     
  34. ThibaultArtefacto

    ThibaultArtefacto

    Joined:
    Mar 12, 2020
    Posts:
    5
    Hi Partel,

    I'm following http://www.root-motion.com/finalikdox/html/page16.html this instructions to use VRIK.
    But my full body is rotating when I'm rotating my head just a little.

    Imagine just rotate your head down, and in VR the full body does it (but my VR camera is detach from the body and keep the position)

    Thanks
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey, thanks for the bug report!
    I found the issue. Please go to InteractionEffector.cs::Initiate, should be line 48 and just remove the if (effector == null) condition. Not sure how a private non-serialized field can not be null, maybe a Unity preview feature bug, weird.

    Hey,
    You could just parent AimIK's target to the camera. Move it to a localPosition of something like (0, 0, 10) so it would always be in front of it.
    Hey,
    That is a new one. Could you try calling ik.solver.Reset() after moving the character from the spawn position?
    Does it always happen with the same model or is it completely random?

     
  36. ThibaultArtefacto

    ThibaultArtefacto

    Joined:
    Mar 12, 2020
    Posts:
    5
    Hey,

    I fix that putting Oculus in Eyes Level tracking origin (floor level before). Thanks.
    Now I try to get Oculus hand tracking positions to move my body's hand following Oculus hands tracking ;-).

    FIRST problem:

    VRIK following oculus hand tracking but there is a Rotation apply on it to render correctly the hand. The problem is that the arm is completely broken.

    I think there are rotations apply on elbow and shoulder but I haven't put object in VRIK script for these part of my body.


    SECOND problem:

    If you remember my first problem, it was with IKExecutionOrder between a Full body Biped and a VRIK (vrik for head and hands , full body for the rest). I put FBBIK first in Execution order and VRIK after, to force the head to follow VRIK one. But now, VRIK change legs too xD .. How can I disable leg for VRIK ? I try to put weight 0 and desactive locomotion but legs are fixed on ground


    Picture concerning the arm problem, is not align with the hand.

    Thanks for help
     

    Attached Files:

    • VRIK.png
      VRIK.png
      File size:
      33.3 KB
      Views:
      367
    Last edited: Aug 27, 2020
  37. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello @Partel-Lang! Im back at developing with VR. How do I make hand poses for my character? Grabbing and Gun shooting? Do Finalik have that? Thanks
     
  38. VirtualWorldArcade

    VirtualWorldArcade

    Joined:
    Jun 29, 2017
    Posts:
    7
    It is completely random. We tried using Reset(), but we've found that moving the positional weight of the head or a left or right hand from 1 to near zero then back to 1 to fix it in the editor. We then made a custom script to do that for when the target bone references for the head or hands are just completely far away from their target.

    We are also trying to turn off the VRIK when a person is far away so that having VRIK doesn't matter to save on CPU overhead. Is there a way to gracefully turn off the VRIK script? We are currently turning it off by disabling the script, but we occasionally get NaN values and the limbs will stretch to infinity.
     
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    1. Sorry, I didn't quite understand, the arm on the screenshot looks fine, what exactly is broken about it?

    2. VRIK still needs to solve the legs because when you move the head, the pelvis moves too and if the pelvis moves, the legs will as well as they are parented to it.
    You can remove all leg bones from VRIK's References to make the solver not use legs at all, but you'll probably just see them floating around then.

    Hey,
    That is weird, have not seen this before.. Any chance you could send me a repro or something I could take a closer look at? Would be the quickest solution, I can't think of a way to reproduce the issue.

    About turning off VRIK, yes, VRIK has LOD levels. 0 means VRIK works as it normally does, 1 has some expensive stuff like shoulder solving and stretching disabled and 2 is pretty much everything disabled. Would be better to use that instead of disabling the solver. Haven't seen those NaN values either so still would be great to see some kind of a repro.

    Best,
    Pärtel
     
  40. ThibaultArtefacto

    ThibaultArtefacto

    Joined:
    Mar 12, 2020
    Posts:
    5
    Hi Partel,

    1. Arm had a 180° rotation, I fix that flollowing your example on Oculus inegration VRIK, I'd forgot something, sorry.

    2. So Full body IK and VRIK are not compatible ?
    I receive data from a server to move my avatar => Full body Biped IK works fine
    I want to control head and hands with Oculus VR Quest headset using hand tracking => VRIK works fine

    Now, I have to combine both. I try IK Execution order putting FBBIK first and VRIK second, does not work :-(. VRIK canceled all FBBIK solving I think

    Thanks
     
    Last edited: Aug 28, 2020
  41. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    I am trying to use Final IK in conjunction with the new Animation Rigging package from Unity, however it is not working.

    My first instinct was to fiddle with the script execution order, however Unity built scripts don't seem to allow this.

    Any idea how to use this alongside Final IK?
     
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,

    FBBIK and VRIK were not designed to be used together, VRIK is basically another version of full body IK designed specifically for VR.
    But they should be able to be used on top of each other like layers. Did you try disabling "Fix Transforms" for VRIK?
    Also can you tell me what exactly is that data from a server moving the avatar?

    Hey,
    When you add a FIK component to a character with Animation Rigging, it should work the same, I mean it will treat Animation Rigging basically like normal animation and be applied on top of it. For example if you go to the 2BoneIK demo, add a LimbIK to one of the legs, it will keep the leg fixed to the target as LimbIK is solved last.
    Can you tell me more about what you were trying to achieve with both Animation Rigging and FIK?

    Cheers,
    Pärtel
     
  43. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    I was going to use the Animation Rigging package for twist bones and other more complex types of constraints.

    I have also been asking on the Animation Rigging forum, you may get a better idea from their response to this issue. https://forum.unity.com/threads/script-execution-order.960231/#post-6256056

    It is due to the RigConstraint scripts not being executable scripts (they don't implement the Update function). This is why I can't use my go-to solution of placing the scripts after Final IK in the script execution order.
     
  44. ThibaultArtefacto

    ThibaultArtefacto

    Joined:
    Mar 12, 2020
    Posts:
    5
    Hi partel,

    I've try to disable Fix transform without success.
    I have a Kinect camera tracking my body in a server.
    This Server is sending the Poses to a Client (containing FBBIK and VRIK). So, I apply these Poses to empty gameobject in the client and give these gameobjects to FBBIK in Targets slots to animate my avatar.

    And for the head and hands, I have an Oculus Quest and I want to use it for it's Head tracking and Hands tracking to have more precise tracking for these 3 targets.

    That's all. Thanks
     
  45. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,486
    Hi Partel,
    Not sure if this has been asked before, but wondered if you have a foot/leg IK demo available? I want to move a person around and have the legs move in that direction without any classic animation driving that, I see final ik does ship with the biped ik demo which seems like halfway there, can you advise perhaps on how to approach this? Do I need to animate the foot effectors?
     
  46. ok8596

    ok8596

    Joined:
    Feb 21, 2014
    Posts:
    40
    Hi, I have a question about Final IK.
    The body of my character is divided by the pelvis and the base of the spine.
    So, to track the pelvis, I set the ParentConstraint component to the root of the spine.

    But when using Biped IK this constraint does not seem to work.
    For example, if Pelvis moves up and down by Grounder IK, spine does not follow it.

    Is there a way to use Final IK and Constraint at the same time?
     
  47. fullerfusion

    fullerfusion

    Joined:
    Dec 2, 2018
    Posts:
    22
    Hi Partel (or anyone else in the forum who could possibly help)

    I'm trying to recreate your mechanical spider using the CCID IK with a custom model however, I'm having trouble with using the Rotation Limit Hinge. Either I'm doing something wrong or I'm just dumb (it's probably the latter) I just can't seem to get the rotation limit to work correctly. I'll provide you with some screenshots:

    My model has four sets of legs. Each leg has three hinges. So, I put the CCID IK component to the parent object of each leg and the Rotation Limit Hinge component on each of the hinges. However, when I lift the base of the leg to test the CCID IK they still have a weird rotation.
    Screen Shot 2020-09-02 at 6.11.03 PM.png

    Here's a GIF showing this. See how the hinge and leg are rotating off the left side:
    Sep-02-2020 18-30-29.gif

    I'm not sure how to solve this. Maybe I chose the wrong Axis for the Rotation Limit or my parameters are not right for the CCID IK. So, I'll send you three screenshot of the Hinges and the settings I put in for the Rotation Limit:
    Screen Shot 2020-09-02 at 6.33.58 PM.png
    Screen Shot 2020-09-02 at 6.33.40 PM.png

    So, those are the issues I'm having. If anybody wants to test the model themselves to see if I did something wrong. I've attached it to this message
     

    Attached Files:

    Last edited: Sep 3, 2020
  48. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    564
    Is there a way for me to zero out all of the physics, like a reset of some kind?

    Right now my character can get to a point where, after moving around a bit, different parts of the body want to orient in different directions, no matter what I try. In this picture, everything should be facing forward, but the hips are constantly off to one side, throwing off everything else on the lower half of the body, too.
     

    Attached Files:

  49. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,486
    Just a thought: Would that not be something like <rigidbody>().velocity = Vector3.zero ?
     
  50. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    564
    It's certainly possible. The body is fully at rest though, the body parts are just slightly facing the wrong directions.