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:
    1,938
    If the hand bone is rotated right, it might be a skinning issue instead, making the wrist look bad. Try adding the TwistRelaxer component to the forearm or the forearm roll bone if you have it. It's a component that runs after the IK and tries to relax the twist angle of the bone between it's parent and child, to help with the skinning.
     
    a-t-hellboy likes this.
  2. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    148
    Awesome. Thanks.
    The problem is fixed but there is a skinning issue in elbow.

    Capture.PNG

    Also the TwistRelaxer on forearm:

    Capture2.PNG

    And right arm hierarchy:

    Capture3.PNG
     
  3. siumanchun

    siumanchun

    Joined:
    Apr 7, 2013
    Posts:
    26
    Help ! Final IK 1.8 How To Subport Playmaker ? Thank You !
     
  4. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    Try also adding another TwistRelaxer on the parent of the forearm.

    Hey,
    Please import the Playmaker integration package from Plugins/RootMotion/FinalIK/_Integration, has some PlayMaker actions in it.

    Best,
    Pärtel
     
    a-t-hellboy likes this.
  5. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    148
    Thanks Partel,

    How can I lock aim ik in one certain axis ? Like head just moves up and down.

    I want head moves up and down according to crosshair (middle of screen), upper body moves up and down with very little weight and left and right with full weight.
    Also I want wrist moves up and down for aiming and for left and right aiming, upper body moves.
    And I don't want any rotation changing in z axis.
    Something like Fortnite.
     
    Last edited: Jan 24, 2019
  6. iklw1115

    iklw1115

    Joined:
    Nov 14, 2018
    Posts:
    15
    Hi,
    Is it possible to display only the lower half of Dummy?
    Now I am realizing it by changing each scale, but it will not work if I try only to the lower body.
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    You can add RotationLimitHinge or other RotationLimit components to the bones, AimIK will use them automatically.
    Then you'll have to also add a script like this:
    Code (CSharp):
    1. public RotationLimit[] limits;
    2.  
    3. void LateUpdate() {
    4. foreach (RotationLimit limit in limits) {
    5. limit.SetDefaultLocalRotation();
    6. }
    7. }
    Assign all the limits you have added to that array. The script will normalize the default orientations for the limits to the localRotations of the bones as animated, so the limits would not clamp the animation, but just the IK.

    Hey,
    If you are working with VRIK, you can make it work on the upper body only by just unassigning all the leg bones from the References.

    Best,
    Pärtel
     
    a-t-hellboy likes this.
  8. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    146
    Hi,

    If make the rigging of different characters using the same skeleton (with different proportions, but same angles), can I reuse the Hand Pose target for IK hand targeting?

    Thanks!
     
  9. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    186
    Hi there... I'm using FinalIK/VRIK for a VR-based project. I'm currently working on getting avatars to sit down in chairs. When I want them to sit, I turn on an animator with a sitting animation and adjust some settings (locomotion = 0 and spine position weight = 0) on the solver to limit how much VRIK animates the avatar.

    What I'm looking for is the lower body to be completely animated by the sitting animation while keeping the hands and head animated by VRIK. I've almost got it working, but I'm running into one small issue. I don't want the root node to rotate with the headset, so in the solver, I tried turning the rotation weight on the spine all the way down. That keeps the avatar's knees where they should be, pointing straight out on the seat. The problem is... now the avatar's head doesn't turn at all!

    So I'd like to keep everything below the neck not rotating, but would like the head to continue to be able to look around. Did I miss a setting? I thought "Body Rot Stiffness" might help, but it didn't seem to effect it how I was hoping.
     
  10. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    186
    Ok... a little addition... I realized that I was using an older version of Final IK (1.61) so I updated to the latest (1.8) and I'm running into a different set of problems now.

    When I'm standing/walking, the legs of the avatar no longer re-orient themselves based on where I'm turned (head and hands) so I can turn around and look at my butt. It's pretty weird... I couldn't find a control that seemed to correspond to this so I'm not sure how to get the old behavior, which is essential to the character controller that I've written.

    When I sit down now, the animation on the legs doesn't look right... the knees are knocking each other where in the animation, there is a fair amount of distance between the knees (this looked correct in 1.61 with the locomotion set to zero).

    On the positive side, since the orientation of the head and hands no longer impacts the legs, I can turn the spine rotation weight all the way back up and have the head look around again while seated, but its really not any good because I need to be able to have the head and hands turn the lower half of the body!

    For now I guess I'll revert back to 1.61, but I wonder if there is a way I can have everything I'm trying to do with 1.8?

    Thanks for your help!

    Note: also tried using the Mecanim Animator's SetLookAtPosition, but that also seems to move the legs a bit when the head is turning :/
     
    Last edited: Jan 26, 2019
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    Yes, if the hierarchy and bone orientations match, you should be able to use the same hand pose target.

    Hey,
    The rotation of the root is defined by the "Max Root Angle" value in the Spine settings. So if you want to keep the root rotation still, set that value to 180.

    The latest VRIK samples legs just once in Start to get the knee bending angle (because of all the leg twitching problems with the previous solution of sampling each frame based on the animation). So you can adjust the leg angle by rotating the knee bone in the Editor. If the knees intersect, rotate the knee bones inward a bit. Also make sure the legs are not 100 straight, but bent slightly in their natural bending directions.

    Then you can adjust the knee angle by the "Ben To Target Weight" slider. If it is 0, the knee will be bent relative to the pelvis, if its 1, relative to the foot target rotation.

    Best,
    Pärtel
     
    joaobsneto likes this.
  12. SteenPetersen

    SteenPetersen

    Joined:
    Mar 13, 2016
    Posts:
    25
    Sorry top bother ya @Partel-Lang, but I have commented on the question that I posted on your forum, please when ya get time I'd love to have some feedback!

    thanks!
     
  13. LazyOnion

    LazyOnion

    Joined:
    Mar 6, 2018
    Posts:
    15
    Hey partel!!
    I am quite stuck in this, I am using vrik with vrtk and trying to have firm posed grabs on objects no matter the rotation of the hand. However, since the model doesn't follow 100% the controllers, the fingers get inside the object, which is fine on some objects but at slim ones or some with weird geometry the fingers appear from the other side
     
  14. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    It's not really an IK problem, rather a problem of extending the IK, but I do have a solution in the works. It's called VRIKInteractionSystem. I have started setting it up in the VRTK framework, but technically it can be used independently too.
    Here's the package (requires VRTK and Oculus utilities, as VRTK doesn't seem to agree with the latest SteamVR plugin at the moment). As it's still in the works, there is no documentations, but I've added some comments to the gameobjects in the scene so you understand what they are for and what they do.

    Best,
    Pärtel
     
    Fanakartal likes this.
  15. SteenPetersen

    SteenPetersen

    Joined:
    Mar 13, 2016
    Posts:
    25
    Hey @Partel-Lang But im using vive and not oculus, and also not using VRTK at all until they release v4 for steamvr 2.0. Can I get it to work without those things?

    Atm I have made it work where I can get the handtarget and handpose scripts to work really nice, but as I move the character around in the world the arms start to look all funky while lerping but then snap into the correct position right at the end of the lerp.

    ------- Edit

    Made it work. I had forgotten to remove the rigidbodies from the handposes and they were therefore standing at a wrong position which caused the handtarget lerping to be wonky.
     
    Last edited: Jan 31, 2019
  16. mathaout

    mathaout

    Joined:
    Aug 16, 2017
    Posts:
    4
    Hi @Partel-Lang

    I'm using your asset FinalIK for IK with vive tracker for knee, foot, hips and hand. I plug it with Morph3D manikin but I get a strange result in the wrist and neck. I show you the result:





    I looked for solutions without success. Do you have an idea to solve it?

    Thanks
     
  17. DevelopedReality

    DevelopedReality

    Joined:
    Jul 14, 2015
    Posts:
    20
    Hi @Partel-Lang. I'm working on a couple VR projects that involve non-humanoid, first-person characters (e.g. quadruped animals).

    VRIK looks amazing with humanoid characters but I'm wondering if/how well it would work with a rigged dog or bird model or something similar.

    Any guidance would be much appreciated! Apologies if this has been addressed elsewhere.

    Thanks!
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    Looks like the forearm roll bone is messing up the skinning. Do you have TwistRelaxer components on the forearms?
    Can you send me that character fbx to support@root-motion.com?

    Hey,
    VRIK only works with bipeds. I have helped a few customers set up some VR dog IK with FullBodyBipedIK before. Its not very easy, but can be done. I have not tried a bird before, but I believe it can be done.

    Best,
    Pärtel
     
    DevelopedReality likes this.
  19. DevelopedReality

    DevelopedReality

    Joined:
    Jul 14, 2015
    Posts:
    20
    Thanks, Pärtel. That sounds promising, even if it's difficult. This might be naive, but I'm hoping a bird wouldn't be too different from a standard biped. Something with 4 (or 6) legs would be trickier.

    Once I purchase Final IK, could you share how the VR dog IK was setup or is there any other documentation available for these kinds of niche setups?

    Thanks again!
     
  20. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Hi @Partel-Lang !!! Could you tell me how I can access by script to "BendGoal and BendGoalWeight", for example of the RightHandEffector del FullBodyBipedIK??? I have been trying to access these variables but I have not known how to do it.

    regards
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    There so documentation to the dog stuff, but of course, I'll give you a demo scene with a dog set up and instructions on how to do it. I must warn you, it is a massive hack though, which is why I'm not really advertising VR dog IK.

    Hey,
    Sure:
    Code (CSharp):
    1. ik.solver.leftArmChain.bendConstraint.bendGoal = bendGoal;
    2.         ik.solver.leftArmChain.bendConstraint.weight = bendGoalWeight;
    Best,
    Pärtel
     
  22. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    44
    Sounds very cool Partel, but I definitely recommend holding out for a bit if you can as V4 will be releasing at some point this month, and it will no doubt be much nicer to work with. Me and a buddy really wanted to get our Knuckles controllers going though so we could finish up some projects without having to wait and/or port to V4. So if you (or anyone else) is/are interested, here's a link to the VRTK 3.3/SVR2.X bridge. Works a treat but do keep in mind that it is unsupported, and really only meant to be something of a bandaid for those who don't want to port to V4 because their project is almost finished and want to get the Knuckles controller functionality in there before release.

    https://github.com/WildStyle69/SteamVR_Unity_Toolkit/tree/feat/steamvr2-input-system
     
    Partel-Lang likes this.
  23. DevelopedReality

    DevelopedReality

    Joined:
    Jul 14, 2015
    Posts:
    20

    Thanks @Partel-Lang. Just purchased your software. That scene & instructions would be a huge help.

    I completely understand that it's stretching the functionality of the software--thanks for sharing all the same! Very much looking forward to getting started with Final IK.

    Cheers,
    Kai
     
  24. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Thanks!!!
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey, thanks for the purchase!
    Here's the dog scene. Requires min Unity version of 2017.4. Play the scene and move/rotate the "Bite Target" to see how it works. Basically you'd need to drag in your dog model, then copy all the components over from the demo dog and replace the bone references in them.
    There are also bone references in the FBBIKHeadEffector component under the bite target. Also make sure the position and rotation of the head effector gameobject matches with the head bone of your dog. Also the rotation of the "Last Spine Bone Target" must match the rotation of the last spine bone, which is the "Aim Transform" of AimIK on the dog.
    Anyway, please try setting it up and if you run into trouble, you can send it over to me and I'll take a look.

    Cheers,
    Pärtel
     
  26. DevelopedReality

    DevelopedReality

    Joined:
    Jul 14, 2015
    Posts:
    20
    Great--thanks Pärtel! Will take a look, do some experimentation and let you know if I have questions.

    FWIW I'm already loving the software. My best asset store purchase so far. Trying now to rig up an ant like the mech spider. Good fun--thanks for the great set of tools and the help!
     
    Partel-Lang likes this.
  27. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    44
    Hi,
    I was just wondering if i would be missing out on anything majorly important if i were to build my own ik rig out of Final IK components instead of using the VRIK script. With the particular hand rig I'm currently working on it seems I'm getting results closer to what I'm trying to achieve by just using the limb ik and some pole targets. Not sure what i should do about getting the shoulders to rotate with the player though. I'm guessing that just childing them to the camerarig isn't a very smart idea? XD
    Any advice regarding this would be great. I would really love to be able to keep this limb solve I've got on there rn because it's working so nicely.

    Oh, i should also probably add that this isn't a full body rig. It's just the arms from the shoulders down.

    Update: I think i may have figured it out. Apparently i will need to use a Full body IK in order to get the shoulders to solve properly? I suppose that makes sense well enough but I'm still open to suggestions if anyone has any neato tips, tricks or ideas. ;)
     
    Last edited: Feb 11, 2019
  28. AtA2k

    AtA2k

    Joined:
    Jun 5, 2015
    Posts:
    5
    Hey,

    A total noob question about Look At IK and Adobe Fuse character. Since bone transforms are not visible in the scenes hierarchy window, how do I assign them to spine, head and eye bones slots in the component?



    Thanks in advance.
     
  29. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    44
    Just taking a shot in the dark here @AtA2k as i don't use Fuse characters, but you might try just building your own using empty GameObjects.
    It seems odd that it wouldn't have an armature though. Are you on Unity version 2018.3 or higher and maybe the prefab just needs to be unpacked or something?
     
    Last edited: Feb 11, 2019
  30. AtA2k

    AtA2k

    Joined:
    Jun 5, 2015
    Posts:
    5

    I am using Unity 2018.3 and prefab is unpacked completely. Thank you for your suggestion, but I already tried with empty gameobjects positioned to the head and spine positions.
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    If you just remove shoulder bones from the References, VRIK's arm solver should work pretty much the same as LimbIK, it also has a bend goal. If that's not enough, you can set arm position/rotation weight to 0, add your LimbIK rig and make it solve after VRIK using the IKExecutionOrder component.

    Hey,
    You probably just have "Optimize Game Objects" enabled in the import settings. FIK can not work with that as the bone transforms will be hidden and even if you expose them, they will be read-only and their rotations can't be modified, which is what any IK absolutely needs to do.
    Please click on your character fbx, go to the "Rig" tab and disable "Optimize Game Objects".

    Best,
    Pärtel
     
  32. AtA2k

    AtA2k

    Joined:
    Jun 5, 2015
    Posts:
    5
    This was it. Thank you!

    Regards
    Rok
     
  33. niza3001

    niza3001

    Joined:
    Feb 19, 2018
    Posts:
    1
    Hi @Partel-Lang ,
    I have a question regarding using FBBIK. I am tracking the five effectors (feet, hands and body) as Optitrack rigid bodies, animating a character in a Unity scene. The movement appears reasonably well, but my only problem is that the character is not turning around. I saw in the documentation that the body effector does not have rotation, which is probably what causes my issue. Is there a way to add rotation to the body effector? I would appreciate any help. Thanks!
     
    Last edited: Feb 13, 2019
  34. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    44
    Holey crap that's brilliant. :eek:
    Thanx!
     
  35. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    hi guys, i was wondering if Final ik + vertexmotion = works?
     
  36. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    215
    Hey guys I have been trying to pick up this "Log on wood" that looks like a cylinder for 3 days now. And i simply cannot get it to work.

    The object looks a lot like a cylinder:
    upload_2019-2-13_0-37-26.png

    I have attempted to extend the script of the "PickUpBox" and "PickUpSphere" that is included in the demo scene however without real results so far this is my script:

    Code (CSharp):
    1.     public class PickUpTrunk : PickUp2Handed
    2.     {
    3.         protected override void RotatePivot()
    4.         {
    5.             Vector3 handsCenter = Vector3.Lerp(interactionSystem.ik.solver.leftHandEffector.bone.position, interactionSystem.ik.solver.rightHandEffector.bone.position, 0.5f);
    6.  
    7.             Vector3 dir = obj.transform.position - handsCenter;
    8.  
    9.             // Convert the direction to local space of the object
    10.             Vector3 characterDirectionLocal = obj.transform.InverseTransformDirection(dir);
    11.            
    12.             // QuaTools.GetAxis returns a 90 degree ortographic axis for any direction
    13.             Vector3 axis = QuaTools.GetAxis(characterDirectionLocal);
    14.             Vector3 upAxis = QuaTools.GetAxis(obj.transform.InverseTransformDirection(interactionSystem.transform.up));
    15.            
    16.             // Rotate towards axis and upAxis
    17.             pivot.localRotation = Quaternion.LookRotation(axis, upAxis);
    18.         }
    19.     }
    When i run this i get some very wrong results:

    upload_2019-2-13_0-39-23.png

    I was hoping some of you might be able to help me?
     
  37. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Hi @Censureret , try for example to put in your script that when the object has reached its destination position (that is, it is already picked up), become a child of the bone of the pelvis of your character.

    Thus, the object as a child of the pelvis, will take more ideal positions since it inherits the changes of the rotations suffered by the pelvis due to the animations and it will look more natural.

    This would be the easy solution, although you could apply those changes of position and rotation manually to the object, without having to make it a child of the pelvis. But that is more cumbersome

    I feel my bad English

    Edit:

    On the other hand watching your script ... Have you tried to put the:
    pivot.localRotation = Quaternion.LookRotation (axis, upAxis);
    by:
    pivot.localRotation = Quaternion.LookRotation (-axis, upAxis);

    It gives the feeling that the calculations are in reverse

    regards
     
    Last edited: Feb 13, 2019
    Partel-Lang likes this.
  38. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Hi @Partel-Lang !!!

    EDIT:
    a question,

    Can the RotationLimits feature be used with a character to create those restrictions of rotation in the movements of the bones?

    regards
     
    Last edited: Feb 13, 2019
  39. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    685
    Hey Pärtel, since your Leap Motion is dead do you think would be possible to adapt the idea to match the new SteamVR Skeletal input? In this way we can map the (full body)humanoid skeleton over the "generic" hand skeleton offered by SteamVR.
    Thanks
    Max
     
  40. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    215
    Sadly this did not help i really really need someone to help me understand this issue in depth! i have been trying for 3 days now!
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    You should rotate the root of the character towards the forward of the body effector, that should be enough.

    Hey,
    Haven't tried it, but can't see why not. Vertexmotion is a shader effect basically and FIK works on the bone level so they should not conflict.

    Hey,
    I see you have sent me the character, it seems fine, cant tell anything wrong with that. Could you also please package me that scene where you set it up with the log so I could take a look at the whole setup?

    Hey,
    RotationLimit support is built into AimIK, CCDIK, and FABRIK. Other solvers like FBBIK or VRIK can't use them due to the nature of those algorithms, they have their own set of internal constraints. You can however disable the RotationLimits and call rotationLimit.Apply(); after the IK has solved, to apply the restrictions, but if the limits are applied, the hands will not end up at their targets anymore.

    Hey,
    It is in my todo list already to make a more generic hand poser for things like that. Not sure when it will be done though, currently in the middle of a major improvement to PuppetMaster and also some VRIK fixes and improvements as usual.

    Cheers,
    Pärtel
     
    Last edited: Feb 14, 2019
  42. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    41
    My apologies if this is a recurring question but it is hard to keep track of different versions and 75 pages of forum posts!

    Quick issue. I have a gun that is attached to the right hand tracking object. Problem is when I rotate my hand too much or really stretch my arm out the model hand doesn't quite follow the tracking target. I have tried the arm stretch script and stiff which works a little better but was wondering if there is a way to have the hand follow the tracker target absolute. I want that sucker fixed on there as though it is a direct child of the hand. Does this make sense? The hand kind of floats of the gun a bit when out stretched. Any ideas appreciated!!! Thought Id ask as there is probably a fix in past posts but I just couldn't find any
     
  43. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,

    If your hand is stretched out far enough, there is always a possibility of not reaching the target perfectly. Humans are just way more flexible than 3D avatars. It would be best to parent the gun directly to the hand bone, instead of the tracker itself, only way to make sure it stays perfectly in hand. The player will not recognize a minor offset from the physical position of his hand to the visual position (actually there is an offset anyway due to imperfect optics, especially if you hold your hand close to the eyes).

    Best,
    Pärtel
     
  44. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    41
    Thanks Partel! Yes I did experiment with that but found it kind of limited the range of motion a little bit. Maybe Ill go back and tweak around with it some more. Thanks for getting back to me as at least now I won't bang my head against the wall trying to solve the unsolvable!!!
     
  45. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    491
    Hi, Partel,
    I'm using Opsive UCC and it quires update loop to update within FixedUpdate(), therefore, I disable all solvers(AimIK, LookAtIK, FBBIK) and I manually update them within UCC FixedUpdate loop.
    Everything seems to work just fine except the InteractionSystem.

    Here is what I did.
    1. I modified InteractionSystem.Update() to public so that it can be called outside.
    2. Right before I call FBBIK.solver.Update(), I call InteractionSystem.Update()

    The above won't work but if I turn both FBBIK and InteractionSystem enabled and let it run Update() by itself, it seems to work, however, it will conflict with Opsive UCC FixedUpdate.

    How can I manually update InteractionSystem?

    Thanks.
     
  46. WintryBlaze

    WintryBlaze

    Joined:
    May 4, 2016
    Posts:
    1
    Hey Pärtel, I'm using AimController and it's working well but when the current target is destroyed and a new one is assigned it snaps to the new target and doesn't rotate smoothly over time.

    I reproduced this in a new scene. Drag in two empty GameObjects and one character. Give the character an AimIK component and AimController component. Make its hand the AimTransform. Then set one of the empties as a target. Play the game. Then delete the empty from the target and quickly pause the game. Then set the other empty as the target and resume the game. It will snap to the other empty instead of smoothly rotating.
     
  47. unity_3drapidsolutions

    unity_3drapidsolutions

    Joined:
    Nov 18, 2017
    Posts:
    17
    Hey Pärtel,

    What is the proper way to change the locomotion weight to zero using a script? After using your calibration script it changes to one, and I want to change it back to zero.

    I tried using this line
    ik.solver.locomotion.weight = 0f;
    at the end of the calibration routine within the IF statement "Input.GetKeyDown(KeyCode.C)"

    I assume I am poorly referencing the variable, but I cannot find the reference for it within the VRIK Script.

    Thanks!
     
    Last edited: Feb 18, 2019
  48. kevante

    kevante

    Joined:
    May 11, 2018
    Posts:
    1
    Hi Partel,

    I have been using VRIK and puppet master to embody a full body avatar. Currently, if I stretch out the controllers and my in-real-life hands, if the VR Avatar model has smaller arms than I do in-real-life, they will stretch out as far as they can in an attempt to reach the hand targets (without reaching the targets).

    What I want to do is allow the hands to stretch from the wrist, and stretch the model mesh while actually reaching the hand targets, within a certain limit.

    I have been attempting to achieve this by modifying configurable joint values in the puppet, but have not been able to stretch the mesh.

    Thanks in advance, and I love your asset and have been using it for various VR projects.
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,938
    Hey,
    You'll also have to make InteractionSystem.Start() public and call it so it initiates properly. I'll make both Start and Update public for the next version too.

    Hey,
    You are right, thanks! Please grab this patch.

    Hey,
    Yes, ik.solver.locomotion.weight = 0 is the way to go.

    Hey,
    There's automatic stretching already built into VRIK. You can enable it if you go to the "VRIK (Basic)" demo and copy the "Stretch Curve" over from the Pilot's arm settings to your own avatar. That's a good default value for stretching the model's arms for you. On PuppetMaster side you'll only need to enable "Update Joint Anchors" and "Support Translation Animation". That will automatically update joint anchors each frame to match them to the current state of the model.

    Cheers,
    Pärtel
     
  50. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    491
    Hi, Partel, I didn't even disable InteractionSystem.
    No matter what I do with InteractionSystem, InteractionSystem will not work when FBBIK is disabled.
    As I mentioned, I have to disable FBBIK and call FBBIK.solver.Update() from FixedUpdate() to make it compatible with UCC.

    Does InteractionSystem depend on FBBIK to be enabled?
    In other words, are there things that I can try?

    Thanks.