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. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Hello, I separated the VRIK avatar from my character controller (the rigidbody and capsule collider) like you suggested but I am still getting the weird movement. After the separation my capsule collider no longer flies all over the place but the avatar still does. I notice it only happens on rotation. Do you have any idea what this might be?

    Update:
    I figured out more to the issue. My Character prefab doesnt move. It has a child object called "Body" has the rigidbody and capsule and is the object that moves. The prefab is more of less just a holder for the different controllers and the body. When I rotate the top level Character prefab VRIK rotates fine, its when I rotate the Body child object (that contains the follow points for VRIK as children) that it messes up.
     
    Last edited: Jan 25, 2022
  2. FrostedBrain

    FrostedBrain

    Joined:
    Sep 26, 2019
    Posts:
    31
    How do I keep my ik from breaking when I build my scene? My IK after build gets broken. Characters shoulders seem stretched and some things aren't as I left them in editor.
     
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I have tried to setup the demo character like you described, but haven't been able to reproduce the issue. Any chance you could send me some kind of a repro project/package so I could have a closer look here?

    Hey,
    Which IK component is that?

    Best,
    Pärtel
     
  4. FrostedBrain

    FrostedBrain

    Joined:
    Sep 26, 2019
    Posts:
    31

    The component is "Limb IK"
     
  5. chadfranklin47

    chadfranklin47

    Joined:
    Aug 11, 2015
    Posts:
    226
    Hello again @Partel-Lang I am using FinalIK in one of my newer projects and I am having an issue with the FBBIK Grounder. The grounder component doesn't seem to respect the bend direction (the blue arrows) of my character's knees. Even in the example scene, rotating the knees of the Pilot character so that the arrows point in a different direction doesn't help. Is this intentional behavior? If so, would it be possible to edit? If not, could you check on this?

    I have tried with Unity 2021.2.9 as well as 2020.3.26 and 2019.4.12 and the results are the same. I am using the latest FinalIK version 2.1.0. I have tried re-downloading and re-installing the package to no avail.

    FBBIK does respect the bend direction as moving the foot effector pinning does cause the knee to bend in the correct direction, but just not the grounder component.

    I did notice a change to the grounder solver by rotating the knees in a completely undesirable initial direction, but that initial rotation caused more problems than it solved.

    Here are some screenshots: Screenshot_3468.jpg Screenshot_3469.jpg
     
    Last edited: Jan 30, 2022
  6. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Hello, I figured out my previous issue but I do have another question for you. Currently I move my character through rigidbody.velocity and because of that my vrik body will fall behind my movement (if I move backwards I can even see into my head). I noticed in your example scene you use smoothInput = Vector3.SmoothDamp(smoothInput, input * s, ref smoothInputV, 0.1f); in VRController.cs. I dont know much about Damping but assume thats why your controller doesnt have the same issue. Do you know a way for me to continue using rigidbody to move my character but apply Damping in some way so it follows correctly?
     
  7. WonkyDonky

    WonkyDonky

    Joined:
    Aug 24, 2014
    Posts:
    65
    @Partel-Lang There is no "Maintain relative position" weight for the shoulders in FBBIK?

    How it's now:


    what I'm looking for:


    Is making shoulder targets the children of the body target the only solution?


    (+ Is there example implementation code for this from the ShoulderRotator demo ReadMe: "You could probably do faster with just rotating the shoulder bones towards the target depending on the height or distance of the target in LateUpdate before FBBIK solves.")
     
    Last edited: Feb 1, 2022
  8. InfinityGameDev

    InfinityGameDev

    Joined:
    Jun 28, 2016
    Posts:
    54


    Hi @Partel-Lang , hope you're doing well! I'm using both PuppetMaster and FinalIk for a third person shooter, but I'm getting bad stuttering. I'm not sure where it's coming from but I've tried a lot of suggestions from this forum.

    • Update mode is Animate Physics, Always animate. Changing this doesn't seem to help
    • All animations are using root motion
    • I'm using the aim controller script from the demo to track the lerping sphere (to try to reduce jitter)
    • I'm using your character controller script from the PuppetMaster demos.
    • Tried changing VSync and Time step
    • All Rigidbodies are interpolating
    • Camera controller has been tested with Update,Fixed, LateUpdate, and LateFixedUpdate
    I think this is connected to the camera some how. Viewing from other cameras or scene view shows no jitter. But I need the AimIK to follow the camera, so it's tricky. Please let me know if I can email you a repo or anything, I would love if I could get this figured out.

    Thanks!

    Edit: Doesn't matter if camera controller is child to player or not
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I can't think of anything that could cause LimbIK to perform differently in a build. It doesn't have any #if UNITY_EDITOR or anything like that. Sometimes scripts can execute in different order in builds though (unless Script Execution Order is used), so maybe something related to that.

    Hey,

    It also depends on how the legs are bent in the animation. It normally tries to maintain the animated bending direction, so it might be the knees have slightly weird angles in animation, which don't normally show when the legs are straight, but with Grouder they are bent and the problem becomes more visible. I'd add 2 new gameobjects to the root of the character. Place them about 1 unit in front of the knees and assign as "Bend Goal" in FBBIK leg settings. Also set "Bend Goal Weight" to 1.

    Hey,
    I don't think smoothdamping has anything to do with it. Which locomotion mode are you using, procedural or animated?

    Hey,
    Yes, the effectors are independent from each other normally. Could parent shoulder targets to body target. Or instead set foot effector weights to 1 to keep them in place and move the root of the character forward.

    Hey,
    Yes, please send me a repro if possible. support@root-motion.com or PM here.

    Cheers,
    Pärtel
     
    chadfranklin47 likes this.
  10. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    I am using animated
     
  11. FrostedBrain

    FrostedBrain

    Joined:
    Sep 26, 2019
    Posts:
    31
    What would I be looking for if it has something to do with script execution order? I removed stuff that didnt exist from there after you mentioned it and tried reinstalling final ik to see if the order changes but it didnt seem to help. I am stumped and this is the only thing keeping me from pushing my major update :(
     
  12. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    How can I use final ik trigger with playmaker? Seems there is no action for this
     
  13. KabirSwain

    KabirSwain

    Joined:
    Mar 9, 2021
    Posts:
    4
    Hi!

    I had a quick question that I have been stuck on for quite some time. When I run my game in the unity editor and instantiate an agent/character then everything runs perfectly but when I build my game into an executable file and then instantiate the agent/character then it becomes a giant.

    I have tried everything, can you please let me know what could cause the issue.

    Thanks!
     
  14. shma_unity

    shma_unity

    Joined:
    Jun 13, 2018
    Posts:
    118
    Hello,
    I apologize in advance if this has already been asked, but I couldn't find it anywhere:

    I'm building a system where you can grab a character's hand and pull them. When the character is being pulled, I want it to start walking/running towards the direction they are being pulled to. Kind of if you would really take someone's hand to make them follow you. I already have locomotion and character controller set up, I just need a way to detect if certain body bones are being yanked on via FullBodyBipedIK.
    I want to ask when, where and how would be the best way to do so.

    All I would need is a vector that points in the direction a hip bone is being dragged (or about to be dragged) to. That vector should also be be bigger the harder the hand is being yanked at.

    A possible way I'm going to try is to take the bone's position before lastUpdate and then register a callback for after solving and taking the difference in position.

    Is there maybe a better or native way to do this? I also have PuppetMaster, in case that provides helper functions to detect the pulling.
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Can you send some screenshots or some more info about what the problem looks like? You mentioned shoulders seems stretched out? That could only happen if something scales the shoulder bone or changes position of upper arm bone. LimbIK on the arm doesn't know about the shoulder bone and it never moves the upper arm bone, it only rotates it. Do the problems go away when you disable the IK?

    Hey, what do you mean exactly by final ik trigger?

    Hey, is there an IK component on that giant, and which one? Do you have any code that sets the scale of the character or are you using VRIK calibrator?

    Hey,
    If it's FBBIK that is used for pulling, and for example pulling the left hand, then you can use ik.solver.leftHandEffector.position - ik.solver.leftHandEffector.bone.position in LateUpdate to get a pulling vector.
    Or you could compare the pose before and after IK update (using ik.solver.OnPreUpdate and OnPostUpdate delegates), use delta pos of the pelvis or spine bone maybe.

    Hey,
    Not sure what to think without knowing more of your setup. Do you have that rigidbody on the VR camera rig or on the avatar (that has the VRIK component)? Is the avatar parented to the VR rig or are they separate? Any information, screenshots and videos would help.

    Best,
    Pärtel
     
  16. shma_unity

    shma_unity

    Joined:
    Jun 13, 2018
    Posts:
    118
    Thank you for your answer! I used the Pre/Post update for unsolved/solved bone positions. One delta for hand, and one delta for the shoulder, so that pull strengths can be better translated into force. This worked really well and resulted in a really nice vector to input into the character controller.

    I'm now looking to do the same for puppet master collisions (shoving a character). I'll try a similar method using the puppet behavior (I might have a question for that, too, but I'll put that on the puppet master thread).
     
  17. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    While I was making the video to show you the issue I figured it out haha, it was my fault. thanks anyways
     
  18. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    Hi, maybe this has already been addressed, but when importing the latest version of PuppetMaster, after importing the latest version of Final IK, there are some ambiguous scripts. As far as I'm aware I updated the assets to the newest versions (using Unity 2019.4) before importing.
    LargeHeader.cs for example exists in Plugins/RootMotion/SharedScripts and there is also a LargeHeader class in "Pugins/RootMotion/Shared Scripts/PropertyAttributes.cs".
    Similar problem for its PropertyDrawer.

    Now the fix is to just remove one of the duplicated classes in the files, so only one of the same class is left, but it would still be nice if that can just work error-free by default.
    Actually, it's better to remove the standalone files "Plugins/RootMotion/Shared Scripts/LargeHeader.cs" and "Plugins/RootMotion/Editor/Shared Scripts/LargeHeaderDrawer.cs", since the drawer code here misses a method in its class organization that is required by another script. Removing the code in "PropertyDrawer.cs" would make the class lose its static Draw method
     
    Last edited: Feb 16, 2022
  19. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Delete the old versions before you update. Otherwise you'll keep the files that I've deleted.

    Best,
    Pärtel
     
    FM-Productions likes this.
  20. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    Okay, thank you!
    I thought I had used a project where Final IK and PuppetMaster wasn't imported yet to test it, but I might have overlooked it and I had a prior imported? Not sure
     
  21. hairibar

    hairibar

    Joined:
    Feb 25, 2017
    Posts:
    7
    Heya @Partel-Lang.

    I have a third person shooter setup, with a character using FBBIK to keep the right hand glued to an IK handle that is a child of the gun. The gun itself is a child of the left hand.
    I also have a dynamic stop transition using foot IK. As part of that transition, I lower the character's body a bit by adding to the bodyEffector's positionOffset.

    This does lower the body, but the trigger hand slightly misses the gun. The gun is a child of the character's left hand, so when lowering the body the gun moves down with it - but the right hand ends up above the IK handle, not at it.
    Once the transition ends and I'm no longer setting positionOffset, the right hand reaches the handle just fine.

    Do you know why this might be? Is there some detail I'm missing about positionOffset? The right hand's target is set to the IK handle's transform, so I assumed that the gun being lowered wouldn't be a problem - but obviously it is.
     
  22. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    The IK reads its target positions just once when the solver starts updating and they are not (can not be) updated while the solver is working. So IK targets parented to the bones that are solved by the same IK ignore the transformations applied by the solver.

    If you force the gun holding hand to its animated position/rotation (in LateUpdate)>
    ik.solver.leftHandEffector.position = ik.solver.leftHandEffector.bone.position;
    ik.solver.leftHandEffector.rotation = ik.solver.leftHandEffector.bone.rotation;
    ik.solver.leftHandEffector.positionWeight = 1f;
    ik.solver.leftHandEffector.rotationWeight = 1f;
    Then it will not budge by you moving the body down and so the other hand will not lose contact with the weapon.

    Could also use a LimbIK pass on the arm like in the "Second Hand On Gun" demo.

    Best,
    Pärtel
     
  23. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    241
    Hi Pärtel,

    I'm using VRIK to control a character, with using different limbs at different stages. When I use VRIK to control arms only and set every other weight to 0 (legs, head, locomotion) to keep the legs in the animated position, the knees are changed by VRIK. You can reproduce it in an empty project with just Final-IK imported: I dragged the dummy into the scene, gave it the HumanIdle animator, added VRIK and set all weights (head, legs, locomotion and arms as well) to zero, except the main VRIK weight. So VRIK is active, but shouldn't really do anything. But when you look at the knees and toggle VRIK on and off, you see that the knees are being changed. It's not that noticable in that character, but with other character models and animations it is more pronounced and quite a problem. I noticed that changing the knee bend weight changes the knee a bit (although the knee goal is and always was empty), but at no value does it actually reproduce the correct knee position (the one from the animation). Is there a way I can use VRIK without distorting the knees?
     
  24. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    241
    Hi Pärtel,

    Sorry for bothering you with another issue: I'm using VRIK with multiple trackers, especially with a body tracker for the pelvis. On some type of character models that works well: Mixamo and MakeHuman for example. But for characters created with Character Creator 3 or DAZ Studio the pelvis gets twisted in weird ways. I've added the character models to your VRIK calibration demo scene. In the attached screenshot, you can see the original dummy on the right has an ok pelvis, as well as the Mixamo character on his right and the MakeHuman character on his left. However, the CC3 character on the very left on the picture and especially the DAZ character to his right have weird pelvis rotations. Character Creator 3 and DAZ are quite popular character creation systems, it would be cool if there was way to make them work with body trackers. I tried to assign different bones to the VRIK references, but no luck. Can you help? I've uploaded the project with all these characters in the scene here: [Google Drive link]. Just open the scene Pelvis_Issue and press C to calibrate. By the way, I've added PuppetMaster.FBX from PuppetMaster to the project, because it contains the getting-up animation used in the VRIK demo of Final-IK (so the VRIK calibration demo scene of Final-IK shows a missing animation if PuppetMaster is not installed).
     

    Attached Files:

  25. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello-

    I'm adding a FBBIK component at runtime and trying to set the bend goal for the left leg using this code
    Code (CSharp):
    1.     P1IK.solver.leftLegChain.bendConstraint.bendGoal = someTransform;
    I keep getting this error
    IndexOutOfRangeException: Index was outside the bounds of the array.


    It points to this line in the IKSolverFullBodyBiped class


    The FBBIK component looks like it is initialized properly as all the references are there etc- Is there some initialization call I have to make somewhere for it to work correctly?

    If I add the FBBIK component in the editor the code works without an error but when I add it at runtime I get the error.

    Any ideas? Thank you.

    [SOLVED] found this post and now its working :)
     
    Last edited: Feb 23, 2022
  26. Wasserwecken

    Wasserwecken

    Joined:
    Oct 9, 2017
    Posts:
    6
    Sorry for the inconvinience first, I dont know where the right place is to post so I also created a entry in your forum:
    https://rootmotion.freshdesk.com/support/discussions/topics/77000270609

    I have the usecase that I have a IK target for a hand. The target is animated and can be played back.

    Now i want to also animate the property of the position weight,
    in order to make a smooth transition to my IK hand animation.

    But it looks like this is not supported. I cannot keyframe any property.
    I guess this comes from the fact that all information is stored behind properties,
    and therefore Unity cannot serialize them?

    I already found a workaround, by creating a custom script that works as a proxy
    for the properties that I want to animate. But that does not feel "right".
    Is there a better solution to it?
     

    Attached Files:

  27. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    I have followed the steps in the FINAL IK TUTORIAL - InteractionSystem Part 1 YouTube tutorial using Final IK 2.1 with Unity 2019.4 following the steps below, and it just doesn't work? I click the button and nothing? The demo scenes all work fine, e.g Interactions.scene etc, however I can't setup my own interactions with my FBBIK characters? Can anyone help me out here?

    • Add the InteractionSystem component to a FBBIK character
    • Add the InteractionObject component to an object you wish to interact with
    • Create a PositionWeight weight curve, that consists of 3 keyframes {(0, 0), (1, 1), (2, 0)}, where x is horizontal and y is vertical value.
    • Add the InteractionSystemTestGUI component to the character and fill out its fields for quick debugging of the interaction
    • Play the scene and press the GUI button to start the interaction

    Many thanks in advance!

    P.S Does the Interaction System also work with VRIK?
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    When those weights are all zero, but "IK Position Weight" is still 1, the solver will still have to make a pass. There might be effector position/rotation offsets used, for stuff like VRIK hit reaction. So Leg IK works all the time. Leg weight is basically blending between fixing the foot to the animated position and the target's position.
    If you don't want legs to be used at all, remove all leg bones from VRIK's References.

    Hey,
    DAZ characters have this weird placement for the first spine bone, the spine is not straight as it should be logically, so it's a problem for the spine solver. Could use what you currently have as Chest bone for Spine and set Chest bone to null in References. Or use this additional component that applies offset to spine bone post-IK.

    Hey, replied to you in that other forum.

    Hey,
    Sorry about that, it's a bug in the current version, there's a link to the patch in the description of that video until I submit the next version.

    Best,
    Pärtel
     
    Greg-Bassett likes this.
  29. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    Thank you!!!! I was going out my mind! All sorted!!! :)
     
  30. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    @Partel-Lang does VRIK work with Interaction System? My VR build is now crashing after I add FBBIK to my VRIK player character?

    I want to use VRIK and be able to grab door handles to open a door etc, or pull a lever, Interaction System seemed perfect solution when using triggers, as it could snap hand to interaction object (e.g door handle) when VRIK controlled hand enters door handle trigger.
     
  31. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    Not to worry, its working now, VRIK with FBBIK and the Interaction System, super cool!!!! :)
     
  32. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    241
    Thanks. I made the solver's hasLegs variable public so I can set it at runtime whenever I need to enable/disable the legs.
     
    loir likes this.
  33. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    241
    The additional component doesn't seem to help: when I set the values so the spine is correct in one animated pose, in another pose the spine will be worse. For CC3 characters your tip with the empty Chest bone helped though: after some experimentation I found that these settings seem to work well for VRIK on Character Creator 3 chars (all three differ from the auto-detected values):

    Spine: Spine01
    Chest: <None>
    Neck: NeckTwist02

    The problem is only that the missing chest makes the upper body a bit more stiff, as if wearing a breastplate. For example, the character no longer hunches the back like the pilot does in the original crouch-walk animation. But that's still better than the weird pelvis rotation from before.

    I couldn't get DAZ characters to work, either with the empty chest or the additional component. I guess the problem is that VRIK doesn't require a straight pose at start where it could calibrate what is straight for each reference bone?
     
    Last edited: Mar 1, 2022
  34. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    812
    Hi!
    I'm running into a (maybe basic?) issue/caveat and I was wondering if there was a common/builtin way of dealing with it.

    I use limb IK on a FBBIK to place hands and wrists dynamically. The setup uses the wrists and ankle bones for each.

    My problem is that the wrist/ankle bones on our models don't use a "natural" rotation nor a "natural" position for a target. So the forward vector of my hand effector doesn't logically translate to a forward position of the hand. It doesn't seem like our model is symmetrical in that regard, either.

    Is there a way to "correct" those angles/positions from FinalIK, other than doing some matrix / transform math myself?
     
  35. TyI3orG

    TyI3orG

    Joined:
    Mar 22, 2021
    Posts:
    15
    I am having an issue with my character, when I move my head slightly left or right the feet start to play the turn animations. I have Locomotion set to Animated, and have Max Angle Moving 10 and Max Root Angle Standing 90, I thought those changed how far you can look before it animates, but I set them very high and had the same results. Is there something else i should be adjusting to get this effect?
     
  36. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Hi Partel, with full body biped IK if I set the rotation weight to 1 for the arms, I noticed it also twist the upper arm quite a bit around its length( X axis around 15 degrees I think) a, which look unnatural and deform ugly due to not having enough poly resolution between shoulder and upper arm. Is there any way to lock the rotation of the upper arm? I think the upper arm by default shouldn't twist as In reality it doesn't rotate in that direction.
     
  37. Hololena

    Hololena

    Joined:
    Oct 25, 2018
    Posts:
    3
    Hello Partel!

    First of all 1000 thanks for your development, it is really great and incredibly helpful!
    I am using VRIK for a normal human mixamorig with an additional third arm sticking out of the belly. (I'll add the movement and interactivity myself later.) Everything works just fine, except that the 3rd arm stutters when you move around. Do you have any idea why this could happen?

    Thanks in advance!
    Lena James
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    I'm sorry, there's not much I can do about it. The spine solver straightens the spine bones to reach the head target and that's how IK works, so if the mesh has been skinned to a crooked spine, it'll look bad.

    Hey,
    Not sure if I understood you there, but there is the RootMotion.QuaTools.MatchRotation method if you need to match the rotation of an arbitrarily oriented wrist bone to another rotation.

    Hey,
    Sure it's the turning animation? It might be the normal locomotion blend tree playing but with values close to 0 so it looks a bit like turning. Does increasing Move Threshold help?

    Hey,
    I usually keep rotation weight at 0 and just rotate the hand bone to target in LateUpdate with "Maintain Hand Rot" set to 1 in FBBIK settings. Looks more natural in almost every case.

    Hey,
    Stuttering means some scripts have mismatched update frequencies.
    Make sure your Animator's update mode is not Animate Physics.
    If using SteamVR, find the SteamVR_Settings file and set Pose Update Mode to only OnLateUpdate.

    Cheers,
    Pärtel
     
  39. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    It seems that if I don't set the rotation weight, the arms takes a whole different path than the original animation, with the elbows passing too close to the waist. It's a rowing animation. I solved it by adding the twistrelaxer component, it seem to solve it, hopefully it won't create issues with other animations. I would have preferred to avoid adding another component to coordinate.
     
  40. Hololena

    Hololena

    Joined:
    Oct 25, 2018
    Posts:
    3
    Hey, thank ou so much for the fast reply!! !
    Animator's update mode is not Animate Physics but normal and Pose Update Mode in SteamVR settings is set to only OnLateUpdate. Do you know anything else I could try? Sorry for stupid, I have spent hours on this, always with same result :(
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Which locomotion module you we using, Procedural or Animated? Does it still stutter when you set locomotion weight to 0?
     
  42. haimmoshe

    haimmoshe

    Joined:
    Jun 3, 2017
    Posts:
    237
    When i try to use the pickup animation on my character the character hands looks strange.

    My character have this components : Animator with idle animation , Rigidbody with use gravity enabled , Capsule Collider , Third person user control , Third person character , Interaction system and Full body biped ik

    Then i did right mouse click on the Full body biped ik script in the inspector and auto-detect References

    Some screenshots to show my settings :

    In the pick up box script i dragged my character and hold point that is child of my character :



    My character inspector settings :



    Then after picking up the box :



    When i change the Weight value in the Full body biped ik script from 1 to 0.7 then i'm getting this. at the game play view window it's the right hand on the scene view window it's the left hand.

    In any settings i tried so far the hands looks rotated strange and not holding the box and when it does holding the box then the whole character body is lean forward too much i tried to move the box a bit far or closer to the character but it didn't solve it.

    What i want to do is to pick up the box like your dummy character does.

     
  43. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    117
    Hey Partel-Lang,

    Is there any way to check if a character is in the interaction trigger with the correct angle and position via Playmaker? Seems there's no actions to check for that, rendering this whole system useless with Playmaker...

    Thank you
     
  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    The InteractionTargets that are parented to the box belong to the crash test dummy, and they won't work correctly with a character that has different bone orientations. Make a duplicate of your character, move, pose and parent the hand bones of the duplicate to the box (just like Bip002 L Hand and Bip002 R Hand) add InteractionTarget components too.
    Get rid of the Bip002 interaction targets (or tag them and use InteractionSystem.tag to define which character uses which targets) and nuke the rest of the duplicate too.

    Hey,
    Haven't used PlayMaker for years, please see if this action (Trigger Interaction) works.

    Cheers,
    Pärtel
     
    EpicMcDude and haimmoshe like this.
  45. Janoooba

    Janoooba

    Joined:
    Feb 9, 2016
    Posts:
    43
    Hey Pärtel,

    I just picked up Final IK for my player model aiming, but I've run into a little issue with the Aim IK and trying to do recoil compensation...

    I've applied this chunk of code for the recoil compensation, and it works quite well for that purpose, but I noticed it now allowed the weapon to bob and sway because of walk and crouch animations.

    aimIK.solver.axis = aimIK.solver.transform.InverseTransformDirection(character.forward);




    Here you can see that when I turn "Recoil Compensation" off the sway is corrected mostly. But while it's on, especially when crouching, the weapon and torso sway wildly while walking.

    I understand this isn't exactly an easy issue to solve, there are always going to be drawbacks, but I was wondering if you had any ideas on how I can get the best of both worlds here.

    Thanks

    Edit:

    I ended up animating a unique transform for each gun that lines up with the barrel in the aim poses, but stays where its at during recoil and reloading, then setting the aim transform to that. It's not perfect, because counter animating position / rotation to compensate for parent movement leaves to a little bit of floatiness, it does work well enough I think.

    Still open to hear other ideas though.
     
    Last edited: Mar 20, 2022
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    My only other idea would have been to use Baker to bake a set of the locomotion animations with aiming corrected by AimIK. Blend between normal locomotion and aiming forward locomotion using a 2D blend tree. Then apply recoil as additive animation layer.

    Cheers,
    Pärtel
     
  47. daedal

    daedal

    Joined:
    Dec 19, 2013
    Posts:
    31
    Hey @Partel-Lang,

    I'm running into a local hand jitter issue when using VRIK with Photon Fusion for networking. This only occurs while the character is moving with joystick locomotion via a local script that updates the character position in FixedUpdate. Without VRIK enabled, the entire body is jitter-free when moving. And VRIK's hand movement is smooth when not moving the character.

    Fusion uses various callbacks to align with its simulation ticks so I did an experiment where I converted Update and FixedUpdate in your SolverManager to use the Fusion versions. This didn't seem to have any effect on the jitter. What did "fix" the jitter was disabling Fusion's calling of Physics.Simulate and letting Unity take over (this worked with and without my SolverManager changes). Obviously I can't stick with that. Does VRIK's solver make any use of Time.fixedDeltaTime? That would need to be converted to the Fusion version if so.

    I also took a look at your PUN2 integration. It looks to be implementing much of the same functionality as Fusion's NetworkTransform. I'm using these NetworkTransforms to sync the head, hands, and character body. The VRIK head and hand movement seems to be syncing just fine across the network (though I haven't ruled out remote micro jitter). Would you still recommend creating a custom adaptation of some or all of this integration? And could any of the logic in this integration help prevent local hand jitter on character movement?

    Thanks for any help!
     
  48. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    You don't need to make changes to SolverManager, you can just disable the VRIK component at Start and call vrik.solver.Update() whenever you need it to update. And it needs to be updated in sync with whatever moves the character (after it has moved for the frame)
    VRIK only uses deltaTime for the locomotion, but that would not cause your head and hands to jitter because spine and arm solvers are not temporal, meaning they reach their targets 100% whenever they are updated.

    Those jitters are easier to understand and debug when you increase fixed delta time and decrease time scale. Then you'll see the problem in slow motion like matrix.

    Best,
    Pärtel
     
    daedal likes this.
  49. FellowPlayer123

    FellowPlayer123

    Joined:
    Dec 23, 2016
    Posts:
    114
    Is there a way to quickly copy the FullBodyBipedIK configuration from one character to the other?

    It's really time-wasting when you have to copy bones configuration each time you upload an updated avatar from Blender.
     
  50. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    65
    I made an editor script that does that for me. It's worth looking into
     
    FellowPlayer123 likes this.