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

    pizzaboy13

    Joined:
    Mar 6, 2019
    Posts:
    18
    How do I interact with the an interaction object with the same hand, same position and facing the same direction but in a different way (i.e. different curves and interaction target position)?

    Maybe replace the interaction component of the object and the interaction target at runtime?
     
    Last edited: Jan 18, 2020
  2. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello, I am afraid I need advice number two :)

    I have a skeleton model with FBBIK component. But it somehow drastically bends it's knees so model floats in the air (screenshot).
    FBBIK has default settings (no affectors). I only rotated knees backward and forward to get blue points instead of yellow cubes. But this behavior occurs even without this step.

    All bones seems to be mapped right inside FBBIK, however there are two Patella bones parented to Thigh bones, same as Calf bones. But they are not used in Avatar mapping and FBBIK, so they should be irrelevant I guess. I tried to disable them too.

    It's this model from asset store, but that's probably irrelevant too :)
    https://assetstore.unity.com/packages/3d/characters/humanoids/skeleton-warrior-119849#reviews
     

    Attached Files:

  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    I'll take a look if you could send me that character fbx with the animation clip and Baker as unitypackage. Or just the character fbx.

    Hey,
    Did you mean you needed to go directly from interaction A to B with the same hand?
    That is best done keeping the hand paused at the middle of interaction A, when it is locked to the object, then use Animation window to create and animation for the A object to move it to B or use scripted tweening (probably easier).

    Hey,
    Creepy dude... Based on that information difficult to guess. Maybe you have GrounderFBBIK active on that skeleton and it raycasts against the colliders on the bones or character capsule? If that's not it, would you mind sending me that fbx?

    Cheers,
    Pärtel
     
  4. giantdoor

    giantdoor

    Joined:
    Sep 11, 2018
    Posts:
    52
    Cool, Thanks!
    One last question, is there any way to have CCDIK or FABRIK follow the rotation of the target, same whay as it happens for biped arms?

    Also, for some reason I really can't understand how the limits are visualized (both 3d and hinges), as the transform doesn't seem to follow them in a consistent way :S

    And, most of all, i can't seem to be able to avoid flipping
     
    Last edited: Jan 22, 2020
  5. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Solved. Stupid mistake on my side.
    I use GrounderIK for every characters, except DAZ humans who use grounderFBBIK. But this skeleton fbx has inverted knees, so GrounderIK bends bones in wrong direction. To fix that I've decided to make an exception and use grounderFBBIK + FullBodyBipedIK, where I fixed knee bones.
    But when character is instantiated during game, my script finds FullBodyBipedIK component and think it's DAZ character, calling this line:
    ik.solver.SetLimbOrientations(BipedLimbOrientations.UMA);

    Now it's ok. Thanks for your reply. I realized it when preparing fbx for you :)
     
    x1alphaz1 likes this.
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    How to pose an full body IK when the editor is not in play mode?
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Neither CCDIK or FABRIK can solve for target rotation, just not supported by the algorithms. Solvers that can, are too slow for game development so I haven't bothered adding them in. If this is a robotic arm, you should check out the Featherstone algorithm they added to Unity 2020.1a if you can use that.
    I have also made an alternative solution to solve robotic arms with PhysX, please check out this package.

    The flipping happens because there may be radically different solutions to slightly different target positions if you always start from the same pose. Disabling "Fix Transforms" may help with that as the solver will start from the last solved position unless there is animation playing on the rig.

    Hey,
    You'll have to add the EditorIK component, that will run the IK component you assign to it in editor mode.

    Cheers,
    Pärtel
     
    laurentlavigne likes this.
  8. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    I have a reload animation for a pistol working using FIK's interaction system, where the left hand takes the magazine out of the gun and follows the animation, it works great. The only problem is though, the character's arm passes through his body as he grabs the magazine. I've tried using a Reach weight curve for the parts where the arm passes through but it seems to move the whole of the upper body. How can I prevent this please? I just need to move his left shoulder forward a little bit.
     
  9. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Hey @Partel-Lang
    I have a doubt; we have a quadruped with the grounder and everything fine.
    Now im trying to make a "Spine System", i want to achieve just like the examples on Spine Animator (The asset in the store)
    FinalIK have this functionality? I think can be achiueved with FinalIK, have you some example?

    Thanks!
     
  10. kkarthikm35

    kkarthikm35

    Joined:
    Jun 29, 2018
    Posts:
    4
    Hi,

    I am wondering if FinalIK allows you to set a position constraint for one of the bones before calculating the IK. For example, in a 6DOF robot arm, can you set the hand to always have a specific pose (position, orientation) and calculate a solution that satisfies that pose constraint? Thanks!
     
  11. jaytwist28

    jaytwist28

    Joined:
    Jul 18, 2017
    Posts:
    50
    Can this asset be used for parkour type movements? Like wall running or even climbing elements?
     
  12. spelafort

    spelafort

    Joined:
    May 8, 2017
    Posts:
    37
    hi partel, I'm having a difficult time preventing the model clipping into itself (both final IK and puppetmaster involved). The two obvious things to do are to change the 'normal mode' of collision/recover of the puppet to active or kinematic, and to make sure self collisions are set 'on' in puppetmaster. However, setting the mode active seems to cause very weird errors (people's arms becoming like twitchy jelly etc.) and kinematic doesn't seem to solve the problem (or to do anything, really).

    I'm wondering if you have any tips for enforcing model self collision?
     
  13. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    I believe so, specially the collision or if the character falls, the ragdoll is pretty good, and it already has it's own getting up animation. Super easy to setup.

    Also, you can setup where to grab/hand position easily.

    I honestly thought that 90 bucks for this asset was a lot before I bought it, but it's actually cheap! This asset is great =)
     
    Partel-Lang likes this.
  14. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    I thought I'd solved this by using the effector offset to bring the gun forward - but the left hand instead goes to the position where the gun would normally be in the animation - it doesn't follow the interaction object that is being moved by the offset.
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Could try adding a Position Offset X/Y/Z curve to the InteractionObject to move the hand around the body. XYZ are in the rotation space of the character root transform.

    Hey,
    I made a little example for you about how something like this could be done with FABRIK. Spine Animator probably offers way more options and stuff, this is just a 10 minute hack.

    Hey,
    There's no solver included in FIK that can solve for both target position and rotation of a 6DOF robot arm. FABRIK and CCD algorithms included can only solve for the target position.

    You should look into the Featherstone algorithm recently added to Unity 2020.1a15 if you can update to that of course.

    Hey,
    There is no tool included that does parkour and climbing out of the box, that has to be custom scripted. FIK has a full body solver that takes care of moving the hands and feet to where you need to place them, but calculating where you need to place them is up to you.

    Hey,
    When you enable Internal Collisions in PuppetMaster and see it twitching as a result, that is because the collision depenetration forces fight with the pinning forces that try to get the hand inside the collider. If it's a VRIK + PuppetMaster setup, you might try reducing pin weights for the body parts that the hand usually collides with, probably pelvis, spine or chest, to allow them to be pushed by the hands. You can do that if you expand the "Muscles" array on the bottom of PuppetMaster and reduce "Pin Weight" under "Props" of a muscle you wish to loosen.

    Cheers,
    Pärtel
     
    kkarthikm35 and Deckard_89 like this.
  16. Safemilk

    Safemilk

    Joined:
    Dec 14, 2013
    Posts:
    42
    Hey just a heads up! Seeing these errors on a lot of classes in Final IK after upgrading the project to 2019.3.0f6! Seems like they changed some stuff in the Animator class! upload_2020-1-29_8-57-5.png
     
  17. Safemilk

    Safemilk

    Joined:
    Dec 14, 2013
    Posts:
    42
    Found out what it is!

    upload_2020-1-29_9-2-29.png
     
  18. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    108
    Hi guys, We are looking to hire a Unity developer with FinalIK and PuppetMaster experience and Pärtel recommended that I'll post it in this thread.
    The ideal candidate will have a ton of experience with FBBIK, VRIK (Quest,Rift,Vive) and PuppetMaster as well as Unity RigidBodies, Soft Bodies and other physics related tasks.
    This is a paid job that can be done remotely (the team is based in LA). Please don't respond in this forum (we don't want to clutter it up) . Just email me directly at eyalfx@gmail.com .
    Thank you.
     
    Partel-Lang likes this.
  19. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    VRIK controlled character with offset

    Love Final IK and particular VRIK. My custom character is working great with VRIK, however, I can't figure out how I can move the character out of its default zero position/rotation.

    I would like the viewer NOT to embody the character as an avatar, but look at it as in a mirror.

    A simple parent GameObject for teh character with an offset and 180 degree y rotation does not work.

    Thanks.
     
  20. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Maybe you could setup the VRIK normally, then setup a camera in front of the character, set the Target Eye camera to Both, and the camera attached to the character's head, you disable it. That could work
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    You must be running FIK v 1.8. Please update to 1.9 or just delete the scripts that produce the errors (they are the AnimationJob versions of AimIK and LimbIK, that are pretty useless because the normal AimIK, LimbIK solvers have better performance).

    Hey,
    Please check out this package, has a VRIK character in a mirror.

    Cheers,
    Pärtel
     
    Safemilk likes this.
  22. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    Hey @Partel-Lang, I recently moved to a new char and I can't figure out why Final IK is acting weirdly with it.
    Animations is working fine and all, but when I use bipedIK shoulder rotation is completely wrong.
    Here is the issue:



    Strangely if I use VRIK it work perfectly fine:


    I would like to use BipedIK for performance reason (no need to solve the full body) and to be able to use look IK, but I can't figure out how I could configure it correctly. I tried every options allowed on the component without success. VRIK got an option to set bone orientation but this doesn't exist on BipedIK.
    BipedIK worked great on previous characters so it's maybe a rig issue, however I'm not sure what BipedIK is expecting for bone rotation. Some of my previous characters got different bone orientation and was still working fine.
    Any help will be much appreciated!

    Edit: The only difference I found on the new rig is arm bones rotation are all oriented the same, while on previous characters shoulder, upper arm and forearm use same orientation except hands being rotated 90° along X axis.
     
    Last edited: Feb 3, 2020
  23. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    Thanks so much, great.

     
  24. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    Save a character pose (VRIK)
    I'm having fun pupeteering characters in VR with VRIK.

    Here is my question, I would like to be able to save or freeze a character's pose.
    Not sure what the best approach is. Would I need to look through all the joints at a particular moment and store their transforms? Do I need to worry about rotations of the joints (I'm hopeless with eulers and quatrtonians,...)?
    Thx, Volker
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    The problem is that BipedIK samples the pose at Start to find out which way to bend the limbs. That character must have it's arms completely extended or slightly inverted so it can't get it right. Please rotate the elbows in Editor so the arms would be bent in their natural bending direction just a little bit.

    Hey,
    If you just disabled VRIK and Animator and set puppetMaster.mappingWeight to 0, that would freeze it I guess.

    Cheers,
    Pärtel
     
  26. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Hi

    Is there a way to make the arm IK determine the position of a whole biped? I'm trying to make a biped hang from his arms so I set the ik target of the hands to the point where he would hang and if he moves I move the pelvis IK target to a point close to the middle between both arms ( but a bit lower ofc). This works ok but it doesn't look completely natural, if the pelvis target is too low the arms look like they are floating insteaf of grabbing firmly.
     
    Last edited: Feb 11, 2020
  27. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I am finding often the legs will spin when teleporting my VRIK body around a scene, it's intermittent when it will/won't spin though.
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    What you could do is run this little bit of code after BipedIK solves:

    Code (CSharp):
    1. public Transform pelvis, handTarget, hand;
    2.  
    3. void LateUpdate() {
    4. pelvis.position += handTarget.position - hand.position;
    5. }
    And add that script to a higher value than BipedIK has in the Script Execution Order.

    Hey,
    Please try enabling Fix Transforms if you have that disabled.

    Best,
    Pärtel
     
  29. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Fix transforms was already ticked, it is likely a circular dependancy issue where the Armature or parent of it is parented to a 'VR Rig parent' and set to follow the VR Head/Hands which are on a different child of the VR Rig Parent.

    I am trying to fix this by having the Armature rotate to match the head facing direction always but this is probably overkill!

    Amending Spine 'max root angle' from the default 20~ to 170 seemed to help but I get the occasional crazy spins on teleport still.

    I would like to share my setup in a small repro project to see if I'm doing anything wrong if that's possible, I understand if your time is limited though of course!
     
  30. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,486
    Hi Partel,

    Could I ask a question for PuppetMaster here? I am really considering to buy but am weary of the price tag and what it can do, I want to have the physics on each NPC/player where they fall over on touch or knock, in my scene there could be e.g. 400 of these, sometimes colliding etc (it's a kind of dance floor scenario) , will puppetmaster have a good performance for that?
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Yes, please send me a repro if you can, probably the quickest solution.

    Hey,
    400 active puppets is waaay too much. Generally the "rule of thumb" is 1 PM pm costs about 2x normal ragdoll in terms of performance and I doubt you would be able to run even 100 normal ragdolls at the same time. It is possible with PuppetMaster to disable the puppets that are not close to any other puppets, but I still doubt it.

    Cheers,
    Pärtel
     
  32. gliealonso

    gliealonso

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

    I have read here a while ago that there is no way to stop the arms clipping through the body while using VRIK, however, is there any changes now?

    Many thanks,
    Gabriel.
     
  33. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,486
    Hi Pärtel,
    Many thanks for your info, I can imagine it could impact performance, if I have 100 ragdolls but those are only turned on if close (or touching)... that may work, e.g. via some distance calculation per puppet, do I understand correct that is built into the puppetmaster scripts? Is it possible to explain that a bit more before I buy, e.g. via a screenshot perhaps of the option. I would like to understand how that might work.
     
  34. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello Why Grounder is also coliding with trigger and step foot on it? Could you fix that? It woudl be great to have an option that force to ignore triggers, cause I need in my project option Queries hit trigger to ON, so I have to turn off it manually in grounder
     
    Last edited: Feb 19, 2020
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hey,
    Don't have anything new to share about this at the moment, sorry. Please try to move the elbows away from the body with Bend Goals or Swivel Offset in VRIK arm settings.

    Hey,

    Basically all you have to to is call puppetMaster.mode = PuppetMaster.Mode.Active to activate and PuppetMaster.Mode.Disabled to disable. You could add trigger colliders to the puppets and use those to activate if another puppet comes close.

    Anyway, I have no problem refunding your purchase if you can't get sufficient performance out of it. Just please do the performance test before putting too much work into other stuff.

    Hey,
    Please grab this hotfix.

    Cheers,
    Pärtel
     
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Thanks I have a problem with ground as you coud see here sometimes on my colider foot is in ok position smetimes no
    upload_2020-2-21_17-28-35.png
    When character walks on it there is a strange distance beetween foot and colider that dissapear after few frames I dont understand why, I dont have any offset as you see on earlier screen, I turn on here all colliders debug mode so you could see that there is nothing to standing on.

    upload_2020-2-21_17-32-5.png
     

    Attached Files:

  37. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    Hey guys i am getting a bunch of errors when trying to use Final IK with unity 2019.3.0 is there an update on the way? :)
     
  38. vorokoi

    vorokoi

    Joined:
    Oct 18, 2019
    Posts:
    39
    No issues here.

    It might be useful if you provided some information on the errors so the potential cause could be narrowed down..
     
  39. torano

    torano

    Joined:
    Apr 7, 2017
    Posts:
    46
    Hi Partel.

    Is it possible to reproduce a spedific pose of a character using FinalIK? What I want is Not let FinalIK make a pose, but let FianlIK reproduce an already created pose.

    For example, I have a model and the initial pose is as below.
    initialPose.png
    And I dynamically setup FBBIK on play, creating ik targets using Animator.GetBoneTransform().
    After setup, the character is like this.
    AfterSetupFBBIK.png

    The pose is slightly different form the original one. But I want to reproduce it with FBBIK.

    Another example is making a pose using VRIK with VR HMD, and instantiate the character and reproduce the pose using FBBIK.

    The reason why I want to FinalIK to reproduce a pose is that I want to move a character like a puppet. Instantiate a puppet with a specific pose first, then move limbs using IK.

    Can FinalIK do that?

    Thanks.
     
    Last edited: Feb 24, 2020
  40. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Hey @Partel-Lang
    I am attempting to add GrounderIK and LimbIK x2 to my VRIK & PuppetMaster setup. I have looked over your sample of VRIK and GrounderIK but when I add PM to the mix it gets messed up. Here are some images, the first is without GroundIK and the second is with everything. I have a feeling it has something to do with the update order of all components but I'm not sure how to fix it.
    Thanks,
    Colton
     

    Attached Files:

  41. unityasoft

    unityasoft

    Joined:
    Oct 28, 2011
    Posts:
    263
    Pärtel please help! I need a FPS setup and your First Person Shooter demo fits what I want. But my guys arm is aiming in the wrong direction with punch animation.. This is what happens:
    whhahah.png

    I'm using the First Person Shooter demo scene, I tried moving the AimTransform out of the head bone and the arm animates properly but I get other problems..The hierarchy is the same as the demo.. I just cannot figure this out

    Untitled.png

    His arm is suppose to be going straight but it goes to the left. What am I missing? Should I use another way for FPS? I want to achieve rotating chest left-right up-down. Is AimIK even for this?

    I found that rotating the head in the animation made a big difference, so when my character is about to punch the head would rotate to the side so I made the head just sit straight and that made the weird effect go away problem solved, but the animation looks silly now. Is there anything else to try?

    I sent you a email with the project files & yes I edited this post 50 times :D

    Peace from Estonia
     
    Last edited: Mar 5, 2020
  42. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Hey is there a way to optimize the ragdolls if I want to have many of them? Aka 20-30 on the screen at once?
     
  43. I-am-Lawrence

    I-am-Lawrence

    Joined:
    Aug 4, 2015
    Posts:
    2
    Hello,

    I set up an Aim IK component and have a character's head, neck and torso looking at a target. This seemingly works fine, but I'm having issues when parenting a camera to the head. At certain angles the camera flickers rapidly. It's very hard to debug, as the flickering only appears when the scene-view is not rendered (editor scripts masking the issue?).

    I've tried disabling all input except for Aim IK and disabling Fix Transforms, no dice.

    I'm guessing it's because the solver is flipping between two solutions, but I can't be sure. Any suggestions or direction?
     
  44. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    Just started using the interaction system so might be simple but I want to pick up a weapon but still maintain orientation to the hand or hands. Any tips? Thank you
     
  45. katonik

    katonik

    Joined:
    Sep 29, 2013
    Posts:
    1
    Hello. Could you help us to solve the next problem.
    We are using VRIK and we need to get local raycast point relative to character's limb. Each limb has a collider and a rigidbody. We use raycast to get interaction point in world space. Then we use collider.transform.InverseTransformPoint(bulletHitInfo.HitPoint); to get point in limb's local coordinates.

    Code (CSharp):
    1.         if (Physics.Raycast(transform.position, transform.forward, out RaycastHit hit, dist, RaycastLayerMask))
    2.         {
    3.             Vector3 hitPointRelativeToLimb = hit.collider.transform.InverseTransformPoint(hit.point);
    4.         }

    And what we can see:


    Left point is the point in local space of character's Thigh. Right point is the point in word space witch equal to the raycasting point.
    In case we disable character's VRIK component, Local space point is in the same plase with World space point.

    As I understood, InverseTransformPoint didn't work correctly when we use VRIK. Could you explain a right way to find out Local point in limb when we are using VRIK with our character?
     
  46. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    Hi. I'm considering to change AimIK to AimIKJ for performance improvement. Before update, I have some questions about that.

    1. Is really faster AimIKJ than AimIK? I have about 50+ characters with 4~6 AimIK bones. Your old post said that AimIKJ is slower than AimIK in certain situations. (https://forum.unity.com/threads/fin...d-ik-1-0-released.222685/page-72#post-3886783)

    2. Behaviour inconsistence between AimIK and AimIKJ
    2.1 AimIKJ create automatically AimXXXTransforms when it is null, then destroys Aim Target transform when AimIKJ is disabled but AimIK does not. I hope that AimTarget should not be destroyed when It is set from external.
    2.2 AimIKJ does not support null Aim Pole Transform. This is not critical, but inconsistence makes migration annoying.
    2.3 AimIKJ does not support fixTransforms. This is critical for me and how to get same effect with AimIK?
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Hi guys, very sorry for the long wait, I was on vacation last week.

    Hey,
    Might be that your animation clip already has the foot elevated like that, please check the animation clip from in the preview window to see if the foot is at 0 height or not. If not, the problem needs to be fixed in animation.

    Hey,
    Please delete Plugins/RootMotion and then reimport the latest package. Might happen if you updated FIK without deleting the old version or upgraded your project to 2019.3.

    Hey,
    You could get all child transforms of the root by using character.GetComponentsInChildren<Transform>(); Then make an array of Quaternion with the same length and store all localRotations of those children, also store localPosition of the pelvis:

    Code (CSharp):
    1. bones = transform.GetComponentsInChildren<Transform>();
    2. localRotations = new Quaternion[bones.Length];
    3.  
    4. for (int i = 0; i < bones.Length; i++) {
    5. localRotations[i] = bones[i].localRotationl
    6. }
    7.  
    8. pelvisLocalPosition = pelvis.localPosition;
    That gives you the pose basically, to put the character back into that pose, just do the inverse (bones.localRotation = localRotations. If this is a Humanoid, you could also use HumanPoseHandler.

    Also, you can use ik.solver.StoreDefaultLocalState(); to store a pose (that IK will normally use for Fix Transforms) and ik.solver.FixTransforms() to reset the character to last stored pose.

    Hey,
    Haven't seen that one before.. Difficult to guess. Does PuppetMaster not follow the pose at all, I mean are the colliders just standing there at all times? Do you have any script that disables the IK components and updates them in a specific order?

    Hey,

    If you just need to aim a punching animation, you should get started with the "Aim Boxing" or "Aim Swing" demo, not first person shooter, as aiming weapons is a bit different from aiming punches.

    Hey,
    You mean with PuppetMaster? Yes, you can set puppetMaster.mode = PuppetMaster.Mode.Disabled for puppets that
    are not close to each other or the player, basically while they don't need any physics. Add trigger colliders to them and use those to switch to PuppetMaster.Mode.Active when they get closer.

    Hey,
    Maybe you have the Animator set to Animate Physics, but updating the camera script in LateUpdate?

    Hey,
    In FBBIK arm settings you have "Maintain Hand Rot", set that to 1. Then make sure your InteractionObjects don't use "Rotation Weight" nor "Rotate Bone Weight" curves and multipliers.

    Hey,
    You'll just have to run your raycast code after VRIK has updated. Use LateUpdate of a script at a higher value in the Script Execution Order than VRIK has or use the vrik.solver.OnPostUpdate delegate to get a call from VRIK each time after it updates.

    Hey,
    Don't bother, AimIKJ is slower than AimIK even with 50+ characters. AnimationJobs are useless so I will probably remove AimIKJ and CCDIKJ from the next release.

    Cheers!
    Pärtel
     
    torano and unityasoft like this.
  48. unityasoft

    unityasoft

    Joined:
    Oct 28, 2011
    Posts:
    263
    Hi, how would I go about achieving the rotating of the character? In the FPS demo you rotated the character, I dont know how to do that with AimBoxing. Is there a demo with this setup?

    Hope you enjoyed your holiday
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,552
    Actually if you need root rotation and stuff like that, you could just use the AimController component (check out the "Aim Controller" demo). That has root rotation built in and if you enable "Use Animated Aim Direction", that will make AimIK work in "offset mode", similar to what Aim Swing demo does. Then just tweak the value of "Animated Aim Direction" until your punch is aimed right. That value means the direction in which the punch is aimed in the animation clip (in character space).
     
    unityasoft likes this.
  50. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    Hello @Partel-Lang !

    I'm having an issue with GrounderBipedIK since I updated to 2019.3. It used to work perfectly, but now it seems to be moving the character's pelvis after the feet have been processed... the issue with that is my characters "pelvis" bone is actually the root of the skeleton, so it moves my entire skeleton down, making the characters feet clip through the floor.

    Hopefully you can see from the image...

    Any thoughts on how I could solve this?
     

    Attached Files:

    • Sage.png
      Sage.png
      File size:
      433.7 KB
      Views:
      390