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,554
    Sorry for multiple posting, my Edit Post button here doesn't seem to work, it keeps loosing all the text..

    Anyway, I got that Dibdab's case sorted out.. Turns out that the Optimize Game Objects option has to be completely disabled, just adding bones required by the solvers to the Extra Transforms to Expose won't do it, because Unity will still treat the character differently (you won't see the animation data of the character in the Animation window). I will update the docs about that.

    Thanks, Dibdab, for helping me improve the package :)
    Pärtel
     
  2. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    working now. could you add effectors to elbow and knees? (or is this effecting resource-hungry?) the shaking/turning was before ik added

    now should I parent the gun and add aimIK?


     
    Last edited: Jan 23, 2014
  3. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    This asset look amazing. I have question about future update: would be possible to smoothly transition from death animation to IK ( lets say in middle of the animation ) for correct character landing to the ground similary as landing feet grounding by raycasting feet position and correcting feet final position but for all bones of the body?

    Edit: ah i see now, it has been already integrated :)
     
    Last edited: Jan 23, 2014
  4. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    I followed the linking effectors to objects video. couldnt find the holdcube script, just carrybox demo script.

    the gun is parented to the hand, the copy-pasted bones are parented to the gun (box in the video) but the hands dont look like the copy pasted ones


    I'm redoing the rig so the base is on ground (not hip-height)
     
    Last edited: Jan 24, 2014
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi again,

    You couldn't find the HoldCube script because it was just created for the tutorial video to show how it could be done (as you could see from the video).

    You can't parent the gun to the hand and then parent the hand to the gun, you'll get circular dependency.
    In the box demo or the tutorial the box wasn't parented to the hand, so thats not how it should be done.

    Can you tell me what functionality exactly are you trying to achieve, so I could point you in the right direction?

    wouldn't it be easier if you just rag doll the character in the middle of a death sequence?

    Cheers,
    Pärtel
     
  6. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    so if I dont parent them in the rig I'll have to... my idea was to pull hand effectors to hold gun object and then aimIk to keep pointing to targetobject

    in my gun script I used separate weapon fbx (it turns to rigidbody from kinematic if player dead, so it drops off*). it wasn't parented in anim if I remember right (the anim are another fbx, I think already done above ground)

    *but I guess I can do that anyway w unparent gameobject (if player turns off)

    seems like somehow anim frame left in the T-pose anim, so posed it to T in anim too. it diffs so that might yield interesting results. but look around files, I had Tpose set already in rig


    no, it animates nicely, but dont see any bones in
     
    Last edited: Jan 24, 2014
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    What you could do is:

    1. parent the gun to the right hand and position it so that it is properly in hand.
    2. if in your animation the left hand is already in the correct position for the weapon, just add AimIK, assign the spine bones to the solver and you're done, no need for FBBIK.
    3. if your left hand is not correctly positioned in the animation, you could try the carry box demo approach just for the left hand. Pose it in play mode, copy-paste and attach to the gun and use it as the FBBIK effector target. The script that controls the FBBIK would be like this:

    Code (csharp):
    1.  
    2. public FullBodyBipedIK ik;
    3.  
    4. void LateUpdate() {
    5. // Pinning the right hand to it's animation, to make sure it won't budge or get pulled in the solving process
    6.    ik.solver.rightHandEffector.position = ik.solver.rightHandEffector.bone.position;
    7.    ik.solver.rightHandEffector.rotation = ik.solver.rightHandEffector.bone.rotation;
    8.    ik.solver.rightHandEffector.positionWeight = 1f;
    9.    ik.solver.rightHandEffector.rotationWeight = 1f;
    10.  
    11. // Pinning the left hand on the gun
    12.    ik.solver.leftHandEffector.position = yourLeftHandTarget.position;
    13.    ik.solver.leftHandEffector.rotation = yourLeftHandTarget.rotation;
    14.    ik.solver.leftHandEffector.positionWeight = 1f;
    15.    ik.solver.leftHandEffector.rotationWeight = 1f;
    16. }
    17.  
    18.  
    4. Now that you have the hands in place you can add Aim IK for the aiming. By default FBBIK updates after Aim IK, so if you want to have it the other way around you should manually override the updating order:

    Code (csharp):
    1.  
    2.  
    3. public FullBodyBipedIK fullBody;
    4. public AimIK aim;
    5.  
    6. void Start() {
    7.    fullBody.Disable();
    8.    aim.Disable();
    9. }
    10.  
    11. void LateUpdate() {
    12.    fullBody.solver.Update();
    13.    aim.solver.Update();
    14. }
    15.  
    16.  
    Check out the last tutorial for more details.
     
  8. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    this is what I have w aimIk on this


    the other anim height and bonerotation adjusted in fragmotion
     
    Last edited: Jan 24, 2014
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    The Aim Transform is not the target to aim at, it is the Transform that you want to aim at the target (your gun).
     
  10. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    gun (is off, even if parented), rHand is used

    its moving. now last question, what is that transform :)

     
    Last edited: Jan 24, 2014
  11. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Final IK is great, I’ve updated foot placement class for my characters (here) to use it in few minutes :D :



    Great tool, thanks for developing this!
     
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    That purple one that you can aim with? Its not a Transform, its a scene view handle that enables you to visualize and change the IKPosition of the solver for quick debugging.

    Hey, Bruno, thats great, thanks for hooking this up! :) Does Final IK make your tool also work with Legacy?
     
    Last edited: Jan 25, 2014
  13. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    @BrUnO XaVIeR
    Well done.. :D
     
  14. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Hi!
    I don't use legacy anymore, but if bipedIK works on legacy it will work too because it hooks to ik goals where you've built custom ones, right.
    I have to check it, but I see no reason why would not work.
     
  15. BL44ST

    BL44ST

    Joined:
    Jan 23, 2014
    Posts:
    2
    This is a must buy for everyone. Thanks for the support as well!
     
  16. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Is there a safe opposite for .Disable() if you need to enable the components again later?
     
  17. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Yes, just enabled = true is as safe as it gets :)
    .. and if you need to disable it again, you can use enabled = false without a worry.
    Disable() just makes sure the component gets initialised.
     
  18. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Please, we need references to foot toe bones as well; in the BipedReferences class.
     
  19. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi, what would you need the toes for?
     
  20. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Partel, I don't know what your InteractionIK does, but I've found a real need for Palm and Fingertips effectors, when interacting with things. The basic hand effector is actually around the wrist area; which is great from a bone point of view, but for actual interaction, it doesn't quite do the job.
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    What are you trying to do, Whippets?
     
  22. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Quite a few things XD Pushing limits as usual...

    Shaking hands, holding hands, touching items with fingertip precision, scratching, yawning, coughing, facepalm - that's what I've been looking at so far, but there's plenty more. Having 2 more stages to the arm (palm, fingertips) would mean a huge difference in the ability to simply get things touching correctly.

    Overall, "the illusion of solidity" is what I'm trying to achieve. It's a small thing, but the improvement in looks and believability is worth it. FBBIK does a great job, better than anything else; but the extra limb stages would give us a real artistic boost - turning the marvellous into the mindblowing. Being able to effect palm or fingertips to local/global position XYZ with the same ease that we can for wrists, would be joyous, and instantly aesthetically pleasing.
     
  23. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Is important to have same number of references of HumanBone class.
    For somethings I still use HumanBone because BipedIK do not reference many extra bones I use from HumanBones.
     
  24. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    Hi Partel i have a weird issue with your great package, i'm using the default UMA animation for run, and the fbbik is added at runtime without no errors (Thanks to Whippets), but look at the character:
    $shot_140128_220836.png
    The hands and the legs are acting weird.
    PD: if you don't see the imagen open it in a new tab :S
     
  25. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Yes, I've been getting this too with UMA, though I've only had knee problems. Perhaps a method for telling BIK and FBBIK what direction we'd like the rotation to be, for those times when it guesses wrong?
     
  26. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Shaking and holding hands can be done just like in the Holding Hands demo, fingertip precision as well as you can see from the interaction system video. You can pose the hand and you can create a pivot for that target at any point (palm, fingertip) and rotate it around however you need.

    Trust me when I say adding fingertip precision to the whole FBIK solver would make it very complex/unstable and practically useless because of the performance cost. You'd need at least 10 4-segmented CCD/FABRIK chains for the fingers + something for the palm + a bunch of extra constraints to keep the motion in valid range...

    I'll look into it. BipedReferences was born in Unity 3, long before the Mecanim humanoid, so it might be indeed a good idea to merge the two..

    Yes, the thing is, FBBIK samples the pose of the character at the moment of initialization, to know which way to bend the limbs, so if you add it in the middle of some of a running animation, it might be that the limbs are not bent the way they are supposed to be at that given moment. But you are right, I should add a way to enforce a certain bend direction, hold on, I'll post a workaround for now..
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi again,

    KirbyRawr Whippets, I've sent you PMs with a patch that allows you to change the default bending direction of the limbs.

    If anyone else here needs this and can't wait for the next update of FinalIK, give me a PM, I'll send it to you as well.

    Cheers,
    Pärtel
     
  28. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    hi partel
    dont know if this has been asked before, but since im not a coder and use playmaker alot, i wanted to know if it would be easy to use ur system with playmaker before i buy it
     
  29. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Probably not. People have been asking this quite a lot though, so I am planning to look into it.

    Soome people have also been asking/worried about Mecanim and the Humanoids, so I made a small web player demo for you guys, go check it out! :)

    Sorry for the poor locomotion anims, I didn't have good strafing animations with root motion and it was not exactly the point of this demo..

    Anyway, it uses AimIK in combination with FBBIK. If you switch to 1st person camera, you'll see that the camera has been simply attached to the head bone of the character (there is no separate camera for the weapon) and if you look down, you'll see your legs and and your shadow (imagine this on the Oculus Rift :D). This is the kind of stuff that the accuracy of AimIK will enable you to do...
    $shooter.png
     
  30. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Partel, could FinalIK make a quadruped (like, say, a horse), lean left and right when turning, or just bipeds?
     
  31. khreathor

    khreathor

    Joined:
    Jan 29, 2014
    Posts:
    6
    Hey,
    I'm working on a custom bison IK rig with Final IK. I'm using CCDs for that task and it works awesome. I did not found any problems at the moment.

    This PRO asset saved my life. I was desperate to write my own IK solvers, but then I found this bundle.
    It's a "must-have" when you're working with rigs and animation.

    Cheers !!
     
  32. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hey Partel,

    I'd agree that IK for each finger would be painful overkill. What I was thinking of was more of a point for "the fingertips" as a whole - But it looks like your InteractionIK solves to palm and fingertips - really looking forward to that, it's going to improve the illusion of solidity by a huge amount :)
     
  33. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Is it possible to get even a tiny guide on how to use Final>IK with Javascript? In fact I'd argue this is a must only that not everyone is going to or can use just C#

    Thanks Partel!

    -Steven
     
  34. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    ...yup rather completely stuck.

    I want to be able to not only Enable/Disable the IK (e.g. character isn't always aiming, thus doesn't need full-time AimIK ), but I also want to be able to adjust the variables, such increasing Weight over time ( 0 to 1 ) to blend into and out of IK smoothly (this is what I'm currently doing with Mecanim IK and its perfect...other than the not-so-perfect IK solving :D)...

    ...and again I need to be able to fire these off from preexisting Javascript scripts.

    I tried to use Playmakers Set/Get Property to no avail, so as I said...completely stuck.

    Thanks in advance Partel!

    -Steven
     
  35. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    ...small victory for Playmaker...

    ...I have an intermediary script (in C#) that has a variable for Weight...mind you I had to comb what documentation there is to guess this:

    Code (csharp):
    1. public float aimTargetWeight;
    2.  
    3. void Update()
    4. {
    5.                  aim.solver.SetIKPositionWeight(aimTargetWeight);
    6. }
    ...and using Playmaker's Set Property Action, I was able to adjust the Weight of AimIK over a short period of time, smoothly blending between using AimIK and not.

    Again I didn't find aim.solver.SetIKPositionWeight(aimTargetWeight); in the documentation, but rather I pieced it together from a different section way down below in 'Accessing Effectors' for FBBIK, which had this bit of code

    Code (csharp):
    1. ik.solver.leftHandEffector.positionWeight = 1f
    ...and guess that adding Weight to the end of SetIKPosition would have the same effect.

    Ultimately though, I did find this info listed in the IKSolver Class Reference​, hehe. :D

    Getting there!

    Phew!
     
  36. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    Hi,

    I'm very interested in this asset, but I don't really know if this is what i'm looking for. We are making models with IK animations in Cinema4D but using them in Unity3D is a pain. Does this asset resolve that issue or is this only for adding IK in Unity3D to models?

    Thx!
     
  37. kevdotbadger

    kevdotbadger

    Joined:
    Sep 13, 2011
    Posts:
    82
    This looks terrific, I'll be purchasing it next week once pay day hits! Quick question regarding this demo, the first person camera seems a little unrealistic. I can see that simply adding a camera to the head bone will add all the bobbing effects, but in real life your eyes auto-correct when you're focusing on your destination, and you don't get that bobbing effect. How would you go about fixing that?
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hold on, Steve, just purchased Playmaker, gonna check this out.. :)

    It is only adding IK in Unity.

    Thanks, Kevdotbadger! :)
    I imagine you can damper camera movement, you can damper it only on the y axis is you like, just make the camera smoothly follow the head bone, not be parented to it. The real problem here is with the camera's near clipping though, you'd probably have to have the head as a separate object not rendered by the camera, otherwise you'd see your own skull from the inside at times :D

    Cheers,
    Pärtel
     
  39. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    SteveB .. This is how I use AimIK to look at someone smoothly ..

    Code (csharp):
    1. var player : Transform;
    2. var lookdistance : float;
    3.  
    4. private var distanceToPlayer : float;
    5.  
    6. private var theLookAtPosition : Vector3;
    7. private var ikLootAt : RootMotion.FinalIK.LookAtIK;
    8.  
    9. private var lookWeight : float;
    10. private var lookSmoother : float = 1;
    11.  
    12. function Awake(){
    13.  
    14.     ikLootAt = GetComponent(RootMotion.FinalIK.LookAtIK);
    15. }
    16.  
    17. function LateUpdate () {
    18.  
    19. // Only check the distance if the Player is alive
    20.     if(playerAlive){
    21.         distanceToPlayer = Vector3.Distance(player.position, transform.position);
    22.     }else{
    23. // Else make the distance bigger so the Troll will NOT look at the player
    24.         distanceToPlayer = 1000;   
    25.     }
    26. // Only look at the player if within lookdistance
    27.     if(distanceToPlayer < lookdistance){
    28.         theLookAtPosition = player.position;
    29.         ikLootAt.solver.IKPosition = theLookAtPosition;
    30.         lerpWieghtUp();
    31.         ikLootAt.solver.IKPositionWeight = lookWeight;
    32.     }else if(distanceToPlayer > lookdistance){
    33.         lerpWieghtdown();
    34.         ikLootAt.solver.IKPositionWeight = lookWeight;
    35.     }
    36. }
    37.  
    38. function lerpWieghtUp(){
    39.  
    40.     while(lookWeight < 0.99f){
    41.         lookWeight = Mathf.Lerp(lookWeight,1.0f,Time.deltaTime*lookSmoother);
    42.         yield;
    43.     }
    44.     lookWeight = 1.0f;
    45. }
    46.  
    47. function lerpWieghtdown(){
    48.  
    49.     while(lookWeight > 0.02f){
    50.         lookWeight = Mathf.Lerp(lookWeight,0.0f,Time.deltaTime*lookSmoother);
    51.         yield;
    52.     }
    53.     lookWeight = 0.0f;
    54. }
     
  40. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451

    Awesome Griffo!

    You didn't have to relocate Final>IK scripts? I thought a few pages back Partel mentioned this might be necessary...

    Thanks man!

    -Steven
     
  41. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    After eyeing this off for weeks for a personal project, I actually gave it a first shot for some stuff at work this week. Only a very simple application, but it was super easy to use and worked like a charm.

    A big thumbs up, and I'm eager to try more of its features in that personal project of mine. :D
     
  42. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Well although I don't even intend to try and use Final > IK for a few months I am looking forward to it and wanted to encourage Puppet Master development so I went ahead and bought it.

    My only question about Final > IK after browsing this thread has to do with Whippets request about finger solver.

    So I know a finger solver is not feasible but is it possible to motion capture a hand animation (e.g. picking up a bowling ball) and blend tree it using Mecanim into a Mecanim / Final > IK combined animation? It seems this is the type alteration to a base Mecanim animation that Final > IK was made to handle.

    It this is a obvious question sorry. I'm not an expert in Mecanim or Final > IK.
     
  43. Madasebrof

    Madasebrof

    Joined:
    Feb 1, 2014
    Posts:
    3
    Amazing asset! Still wrapping my head around it all...

    Just a quick question. I was playing around with the Unity MechanimTute (https://www.youtube.com/watch?v=Xx21y9eJq1U) added a Full Body Biped IK script to the robot (which successfully found all the bone references), then added the "Effector Offset" script. If you add an offset to any of the components, e.g. the hands, feet, etc, the character starts to twitch, as if the animation is being updated by the Mecanim, then the Full Body Biped, then the Mecanim, etc., as if they are fighting for control over the bones, instead of the bones being animated, then offset by FBBIK . The setup seems identical to the example you provided in the sample scene "Effector Offset", so I'm just wondering what could be causing this.

    (I disabled the control scripts, so there is nothing else acting on the character other than mecanim FBBIK)

    Again, amazing work.

    All the best,

    Adam
     
  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi again, and thanks a lot :)

    Yes you can add IK solvers to the fingers that are animated with Mecanim, and you can have RotationLimits on the fingers if you are using CCD or FABRIK solvers.

    @Madasebrof, it is probably biped auto-detection fail, make sure the Pelvis bone in the references is the first bone in the hierarchy that is located at the hips of the character. In this particular case, auto-detection thinks the pelvis bone is the "Hip", but it should be the "Root" instead. So just change the pelvis bone and it should work ok.
    It is a known issue, I will improve the auto-detection in the next releases. :)

    Cheers,
    Pärtel
     
  45. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    Hi Partel i sent you a PM but i also have another issue:

    Here is a photo with "LookAtIK" with all(Eyes,Spine,etc..), the problem are the eyes if you look at them they are like messed:
    $shot_140202_165545.png

    If i put null in eyes it works good, like before but without eye messing, but also i'm getting a null reference exception, is there any way to solve it?
    $shot_140202_170121.png

    The code with eyes :
    Code (csharp):
    1. lookIK.solver.SetChain(refs.spine,refs.head,refs.eyes,refs.root);
    The code without eyes but with null reference :
    Code (csharp):
    1. lookIK.solver.SetChain(refs.spine,refs.head,null,refs.root);
    Thanks in advance and please reply to the PM when you can/want (Only a reminder xD)!

    -Another question is : Are there any way to clamp the hands in a place?

    -And finally another more: Are there any way to use a gameObject as a target for lookAtIK? if not, how can i access to the target position etc..., thanks in advance.

    I tried to read the doxygen info but i didn't find nothing.
     
    Last edited: Feb 2, 2014
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi Kirby, thanks for the feedback! :)

    Indeed you have found a problem with SetChain.. You can avoid it for now if you instead of passing a null, pass a 0-length Transform array instead, like
    Code (csharp):
    1.  lookIK.solver.SetChain(refs.spine, refs.head, new Transform[0], refs.root);
    The eyes can be messed up for only one reason - they are not looking at root.forward at the moment of solver initiation. In the UMA scene, the characters have an idle animation in which they are looking left and right so chances are, you are adding the component in runtime when the head and the eyes are not looking forward. But luckily you can override the local axis of the eye (or spine or head) bones that you want to face the look at direction by:
    Code (csharp):
    1.  
    2. for (int i = 0; i < lookIK.solver.eyes.Length; i++) {
    3.    lookIK.solver.eyes[i].axis = lookAtAxis; // in case of UMA characters, its Vector3.left
    4. }
    5.  
    About clamping the hands in place... it can't be done with LookAtIK, as it rotates the parent bones of the hands, but it can be done if you combine LookAtIK with FBBIK. You would just store the positions of the hands in LateUpdate before LookAtIK solves, and use them as effector positions of FBBIK. FBBIK will update after LookAtIK and move the hands to where they were.

    You can use a GameObject as the target for lookAtIK:
    Code (csharp):
    1.  
    2. lookIK.solver.IKPosition = gameObject.transform.position;
    3.  
    I'll go see your PM now :)

    Cheers,
    Pärtel
     
    Hedonsoft likes this.
  47. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    Thanks a lot Pärtel, i will try those things :)
    I'm using FBBIK so don't worry about the hands things it's just i didn't know how to do it haha :)
     
  48. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    So what's coming up in next the next version Partel?

    Certainly you can't be done... :D

    Cheers man

    -Steven
     
  49. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Okay I just got around to attempting using FinalIK with JS...

    ...and this doesn't work. I suspect it's the location of the FinalIK scripts, so can you be more specific Griffo on how you got this to work?

    Here's the error fwiw:

    Code (csharp):
    1. Assets/_Scripts/Misc/Sample_FinalIK_Usage.js(6,24): BCE0018: The name 'RootMotion.FinalIK.LookAtIK' does not denote a valid type ('not found'). Did you mean 'HutongGames.Utility.Lists'?
    2.  
    @Partel - Can you chime in here on using FinalIK within JS scripts please?

    Thanks guys
     
  50. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    The error 'RootMotion.FinalIK.LookAtIK'

    "RootMotion" is a Dir I put the FinalIK Dir in so just change that line to where you have put the FinalIK Dir or just remove "RootMotion." from the line below if you installed it without moving anything around and that should work.

    Code (csharp):
    1. ikLootAt = GetComponent(RootMotion.FinalIK.LookAtIK);