Search Unity

FINAL IK - Full Body IK, Aim, Look At, FABRIK, CCD IK... [1.0 RELEASED]

Discussion in 'Assets and Asset Store' started by Partel-Lang, Jan 15, 2014.

  1. Partel-Lang

    Partel-Lang

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

    First you need to make your biker a ragdoll character (GameObject/Create Other/Ragdoll or do it manually).
    Then you can use a script like that to go to ragdoll whenever you need:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using RootMotion.FinalIK;
    4.  
    5. public class RagdollTest : MonoBehaviour {
    6.  
    7.     public Animator animator;
    8.     public FullBodyBipedIK ik;
    9.  
    10.     private Rigidbody[] rigidbodies;
    11.  
    12.     void Start() {
    13.         // Get all the Rigidbody comps
    14.         rigidbodies = GetComponentsInChildren<Rigidbody>();
    15.         foreach (Rigidbody r in rigidbodies) r.isKinematic = true;
    16.  
    17.         // Register to get a message from FBBIK each time it is finished
    18.         ik.solver.OnPostUpdate += AfterFBBIK;
    19.     }
    20.  
    21.     // This gets called by FBBIK
    22.     void AfterFBBIK() {
    23.         // Go to ragdoll right after FBBIK is finished so we have IK pose to start with, not the animated pose
    24.         if (Input.GetKeyDown(KeyCode.R)) {
    25.             ik.enabled = false;
    26.             animator.enabled = false;
    27.            
    28.             for (int i = 0; i < rigidbodies.Length; i++) {
    29.                 rigidbodies[i].isKinematic = false;
    30.                 rigidbodies[i].WakeUp();
    31.             }
    32.         }
    33.     }
    34.  
    35.     // Cleaning up
    36.     void OnDestroy() {
    37.         if (ik != null) ik.solver.OnPostUpdate -= AfterFBBIK;
    38.     }
    39.  
    40. }
    41.  
    Hi, sorry I didn't quite understand, what is Pose? Is it where you just rotate the bones one by one to their posed targets or are you using IK for it?

    The solving process of the IK component looks like this:
    Code (CSharp):
    1. void LateUpdate() {
    2. Read(); // Reads the current pose of the character
    3. Solve(); // IK solver solves virtually
    4. Write(); // The solved pose is applied on the character bones
    5. }
    So you see FBBIK takes whatever pose the character is in LateUpdate as it's start pose, if no effectors are enabled, it will solve "empty" and write back the same pose. If the component is disabled, that process simply won't happen. Usually that start pose is whatever Mecanim applies to the character, but if you need to start from a specific pose, you should apply it to the character in LateUpdate before the IK solves.
    Im not sure I understood the question so I hope this answer was relevant :)
     
    OnePxl likes this.
  2. Partel-Lang

    Partel-Lang

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

    I have no official roadmap, but this is my todo list at the moment. I can't guarantee all of it can or will be done, but thats where I'm aiming. It doesn't show about a 1000 already completed tasks for Final IK.

    Physics like that will not be included to Final IK, it is meant to be more or less IK-only package, otherwise it would just grow indefinitely. But I have plans for a powerful physics tool that I've had a prototype for a while now, but only just recently had a chance to pick up development on again.

    Physics driven animation is definitely more cpu-intensive than normal animation. About that video you linked, I don't have a lot of faith in 100% physics driven animation for games. You see game characters generally don't follow the rules of physics. If they did, they'd be clumsy and unresponsive (as in that video). In games, its usually some sort of hybrid solutions (mocap/IK/physics) that work the best. :)

    Hi,
    I'm sorry, what exactly do you mean by "Initiate a maximum slope"?

    Cheers,
    Pärtel
     
    FernandoRibeiro likes this.
  3. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    That physics tool looks awesome! Is it going to be part of Final IK? Also, is there a guide or tutorial about how Final IK can be used to improve mobile performance?
     
  4. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    A character controller has a slope limit, stopping the character from going up steep ground. But my character has a rigidbody and does not use a character controller so at the moment it is able to walk/run up 80 degree slopes.
    So I was wondering if a slope limit could be achieved using your components?
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Thanks, it will not be part of Final IK, as it is not dealing with inverse kinematics.
    I have no idea though how you can use Final IK to improve mobile performance generally other than the fact that using IK dramatically cuts down the number of animation clips you would need, hence reducing memory footprint.

    This problem is not related to inverse kinematics, so no. Have you tried the 3rd person character controller from the Example Assets? I have implemented a heavily modified version of it in one of my demo scenes.

    Cheers,
    Pärtel
     
  6. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    Hi Pärtel,

    first off, have to say your asset is AMAZING !
    second, could I have your advice?, i'm wondering what 2d method I should follow as id like to use Final IK on my characters

    so far I've looked at smoothMoves, which has a bone system that is separate from the graphics which makes a lot of sense to me,
    doesn't look like I can use my own mesh renderer with smoothMoves,
    just found a free and open source 2d skeletal system Unity Sprites And Bones

    Do I even need one of these 2d bone plugins with Final IK?
    Can I just set up the rigs in unity as a hierarchy like what you have on your dummy characters, but have the 2d meshes on each of the bones?

    Cheers,
    Nick
     
    Last edited: Oct 3, 2014
  7. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    I'm curious if there is a sample script for aim or look at ik that chooses a player character at random (with tag player) and weighs in and out the ik based on an if/else statement... I tried to make one, but it doesn't work properly.

    EDIT: I suppose I should post my simple script that doesn't seem to be working properly:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using RootMotion;
    4. using RootMotion.FinalIK;
    5. using BreadcrumbAi;
    6.  
    7. public class EnemyLookAtIK : MonoBehaviour {
    8.  
    9.     private Ai ai;
    10.     private GameObject Player;
    11.     private Vector3 playerPos;
    12.     public LookAtIK lookAt;
    13.  
    14.  
    15.     // Use this for initialization
    16.     void Start () {
    17.  
    18.         ai = GetComponent<Ai>();
    19.         Player = GameObject.FindWithTag("Player");
    20.  
    21.     }
    22.  
    23.     // Update is called once per frame
    24.     void Update () {
    25.  
    26.         lookAt.solver.IKPosition = Player.transform.position;; // Changing the look at target
    27.  
    28.         if (ai.moveState == Ai.MOVEMENT_STATE.IsFollowingPlayer)
    29.                 if (ai.moveState == Ai.MOVEMENT_STATE.IsFollowingBreadcrumb) {
    30.                         lookAt.solver.IKPositionWeight = 1f;
    31.                 }
    32.         if (ai.moveState == Ai.MOVEMENT_STATE.IsIdle)
    33.         if (ai.moveState == Ai.MOVEMENT_STATE.IsPatrolling)
    34.         if (ai.moveState == Ai.MOVEMENT_STATE.IsWandering) {
    35.                         lookAt.solver.IKPositionWeight = 0f;
    36.                 }
    37.  
    38.     }
    39.  
    40. }
    EDIT #2: Got it working. Had to use a different state. Thanks.
     
    Last edited: Oct 3, 2014
  8. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    That gave me a good laugh. We definitely, definitely need more games about dinosaurs :)
     
  9. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
  10. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Pärtel,

    Don't have any questions, just wanted to say thanks again for making Final IK so great - we've just released our Greenlight trailer, and the Final IK procedural interactions definitely steal the show, see if you can spot them ;)
     
  11. lushdog

    lushdog

    Joined:
    Apr 30, 2014
    Posts:
    16
    Sorry Pose() is a basic method that I wrote that takes applies a target set of bone position/rotation to the character.

    I essentially post the character using FinalIK in play mode. Copy all the bone positions into a sub-object of the character. I take the copied positions of the bones and use those to pose the character via script but without IK enabled so I can get the effectors to be at 0 position weight but located over the posed bone.

    I'll try calling my Pose() method in LateUpdate() rather than where it is now. If that doesn't work I can look at 'resetting' the character IK before next Pose() call. I don't have a kneeling animation in Mecanim, perhaps this is why it's not making sense to you :)

    As always thanks for the help Partel.
     
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi, Nick and thanks!

    I don't have any dedicated 2D IK components yet. I haven't thoroughly tested the existing ones on 2D hierarchies either, but I can tell you so much that Full Body IK would not work well directly. It would rotate the sprites or the sprite bones along all 3 axes and it is probably not what you want. BUT, just thinking of this, it wouldn't be too hard to map a 2D sprite character to a virtual 3D animated character that uses IK. So basically if you have a 3D bone hierarchy that is proportionally similar to your 2D character, you can map the 2D character to it in LateUpdate, after the IK is finished, using camera.WorldToScreenPoint().

    The code for it would look more or less like this (untested):
    Code (CSharp):
    1. [SerializeField]
    2.     public class Bone {
    3.         public RectTransform sprite; // the 2D sprite
    4.         public Transform transform; // the 3D bone to map to
    5.         public Transform rotateTowards; // the 3D bone to rotate the sprite towards
    6.     }
    7.  
    8.     public FullBodyBipedIK ik;
    9.     public new Camera camera;
    10.     public float z;
    11.     public Bone[] bones;
    12.  
    13.     void Start() {
    14.         // Register to get a call from FBBIK each time it is finished updating
    15.         ik.solver.OnPostUpdate += AfterFBBIK;
    16.     }
    17.  
    18.     // Called by FBBIK each time it is finished updating
    19.     void AfterFBBIK() {
    20.         foreach (Bone bone in bones) {
    21.             MapBone(bone.sprite, bone.transform, bone.rotateTowards);
    22.         }
    23.     }
    24.  
    25.     private void MapBone(RectTransform sprite, Transform bone3D, Transform nextBone3D) {
    26.         // position of the 3D bone on the screen
    27.         Vector3 screenPos = camera.WorldToScreenPoint(bone3D.position);
    28.         screenPos.z = z;
    29.  
    30.         // position of the next 3D bone on the screen, used for rotation
    31.         Vector3 nextScreenPos = camera.WorldToScreenPoint(nextBone3D.position);
    32.         nextScreenPos.z = z;
    33.  
    34.         // Translate the sprite
    35.         sprite.position = screenPos;
    36.  
    37.         // Rotate the sprite towards the next bone
    38.         Vector3 dir = nextScreenPos - screenPos;
    39.         sprite.rotation = Quaternion.LookRotation(nextScreenPos - screenPos, -Vector3.Cross(Vector3.forward, dir)); // not sure about this one
    40.     }
    41.  
    42.     // Clean up the delegate
    43.     void OnDestroy() {
    44.         if (ik != null) ik.solver.OnPostUpdate -= AfterFBBIK;
    45.     }
    Let me know if you need more help setting this up.

    Yes, dinosaurs are very important! :)

    Actually it means I was planning to add the dino skeletons from this video to a demo showing how you can add other IK components to work together with FBBIK.

    Hey, thanks!
    Best of luck with the Greenlight, looks like you're gonna do great! Did you use the Interaction System or a custom setup for the interactions?

    It's always great to see the projects you guys are working on with Final IK! :)

    There is a component in the package, GenericPoser.cs, that might help you with the posing. It is a fairly simple script that was designed to be used for posing the hands, but it might work for your case just as well (sorry it didn't occur to me earlier, there are so many scripts in the package, I've forgotten about most of them :))
    So you can have a GenericPoser for each of your predefined poses, and just weigh them in/out as you need.
    If you right-click on the component header, you'll see the Auto-Mapping button in the context menu, that will try to fill in the mapping for you.

    Let me know how it works out,
    Pärtel
     
  13. SupremeBeing

    SupremeBeing

    Joined:
    Jun 28, 2013
    Posts:
    7
    Hi Pärtel

    I have a basic forehand tennis swing animation where the point of impact with the ball is to the right side of the body at about half the body height. I want to be able to use final ik to make the impact point higher or lower.

    I have tried using AimIK to aim the spine at a target. This works ok... the problem is that the spine loses the rotation contained in the animation since it is stuck looking at the aim target.

    What I essentially need to do is just tilt the spine in whatever direction - without effecting any rotation in the animation. Is this possible?

    Thanks.
     
  14. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks! We're using the interaction system as a base, with our custom setup on top of it that handles networked interactions etc.
     
    Partel-Lang likes this.
  15. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    Thank You!
    do you know if its possible to have a dynamic bone structure with a virtual 3D character?
    or would i create different 3D rigs for each morph?

    Really excited about your amplifier scripts, its got me constantly reconsidering making a static mesh character, vs my current 2D dynamic mesh character
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi,
    Yes, have you seen the "Aim Swing" demo scene? I can be done with AimIK using a "pin" like in the demo.

    I'm not sure really, this kind of thing is yet to be invented.

    Cheers,
    Pärtel
     
  17. MarceloCosta_GamesBR

    MarceloCosta_GamesBR

    Joined:
    Jul 29, 2014
    Posts:
    7
    somebody know how i can get the ik position of the hand by script?
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    if its FullBodyBipedIK, then its ik.solver.leftHandEffector.position;
    if its LimbIK, then ik.solver.IKPosition;
     
    MarceloCosta_GamesBR likes this.
  19. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi Partel!

    I've Final IK for some time and i didn't go too deep with that(My fault). I use it mainly for aiming and look at a target at the same time, but i want to make it a better making the characters put the left hand in a different position with each weapon type. Could you tell me what combination of solvers and/or tips to achieve this three things at the same time?

    Thanks a lot!
     
  20. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
    Hey Partel, I implemented your Driving Rig on our character, it's working very well and the IK solver is outstanding. We have encountered one strange bug where the entire skinned character will randomly disappear/reappear. There is no bone animation attached to the skeleton, just the FBBIK Script. Any idea why this might be happening?
     
  21. Partel-Lang

    Partel-Lang

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

    You can do it the with LimbIK (faster) or FBBIK (more possibilities and can be used for other stuff as well, set iterations to 0 for max speed without full body effect). You can offset the left hand relative to the right hand like this:
    Code (CSharp):
    1. public Vector3 offset;
    2.  
    3.     void LateUpdate() {
    4.         Vector3 offsetInRightHandSpace = ik.solver.rightHandEffector.bone.rotation * offet;
    5.  
    6.         // FBBIK
    7.         ik.solver.leftHandEffector.positionOffset += offsetInRightHandSpace;
    8.         // set "Maintain Hand Rot" to 1 from the bottom of the Left Arm in the FBBIK inspector so the rotation of the left hand will be maintained as animated
    9.  
    10.         // LimbIK
    11.         ik.solver.IKPosition = ik.solver.bone3.transform.position + offsetInRightHandSpace;
    12.         ik.solver.IKRotation = ik.solver.bone3.transform.rotation;
    13.         ik.solver.IKPositionWeight = 1f;
    14.         ik.solver.IKRotationWeight = 1f;
    15.     }
    Hi, Huxley,

    It must be just that as you are dislocating the entire character with IK, the skinned mesh will end up out of its bounds and will be culled out by the renderer. So either make sure the character root moves along with the seat of the car so the bounds would match roughly the final position of the character or check "Update When Offscreen" on the Skinned Mesh Renderer and set Animator culling mode to "Always Animate."
    Use the latter to make sure whether this is indeed the issue and the former to solve it, so you'll still have use of the culling. :)

    Cheers,
    Pärtel
     
  22. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Hi Pärtel!

    I have a question about the philosophy / architecture of Final IK. I would like to use three IK components more-or-less in parallel for my quadruped character: GrounderQuadruped (obviously!), AimIK (for the head) and FBBIK (to move the body in small ways to make it look less stiff during idle etc.).

    My question is this: can I assume that Final IK is stateless? In other words, can I decide for myself at each frame (in LateUpdate()) whether or not to call solver.update() for any of the three parallel components, or would this result in weird behavior? By 'stateless' I mean that a solver would be independent of the solutions it calculated in the last frame, and only base its solutions on the (1) current state of the bone chain plus (2) the current parameter-settings (like weight etc.).

    This may be a naive question because I dont know the innards of your system! But obviously statelessness would be be a nice assumption to make, because I could decide at any time to switch on / switch off or fade in / fade out any solver, I could leave all the solvers enabled all the time even when I dont tell them to update, and so on.

    Thanks, Wendelin
     
  23. Partel-Lang

    Partel-Lang

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

    yes, you are correct, all components of Final IK are history-independent (stateless). So each time they solve its like this:

    1. read the current pose of the character
    2. solve
    3. write the solved pose on the character
    4. forget about it

    The exeption is when there is nothing overwriting the solved pose before it solves again, in which case the effect of the solver will be additive (normally, Mecanim/Legacy animates and overwrites the pose).

    So the result only depends on the pose of the character before solving and the parameters of the solver. If both match, you will have the same solution each frame.

    Cheers,
    Pärtel
     
  24. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    That sounds awesome - congrats on a very thought-through design! Just one clarification: maybe I am misunderstanding something, but I am (was) under the impression that at least some of the solvers read 'initial poses' the first time they are loaded in order to initialize themselves. Wouldnt that make them stateful (though in a minor way)?
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Thanks! Yes, that is also true, it is required only to analyse the character to know which way the limbs bend. It could be done each frame, but that would be just wasteful on the performance and glitchy because sometimes, because of keyframe reduction, compression, interpolation issues, the limbs might flip (I mean like break from the elbow) in the animation if they were really close to straight. Without IK its not really visible, but with IK, you can't calculate the elbow/knee direction based on just frame by frame reading, because that flipping would also invert the bend plane normal. By sampling the initial pose, I can make sure the rotation of the elbow/knee joint will be maintained as animated but will not exceed the valid rage, which in the case of FBBIK is 90 degrees in any direction from a right-angledly bent limb.
     
  26. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    OK, that makes sense. By 'initial pose', you mean the state of the bone chain as it is 'found' by the IK solver in question at the time that it's Awake() or Start() method is called, not the default pose of the model in the imported FBX file, right? But if I attach a solver to my character in the inspector, will the solver be initialized before or after the first frame of the first default animation (in the Mecanim Animator controller) is applied to the model?

    And: the way to change the initial pose used by an IK component is to delete the component and load a new version of it, no?
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    The initial pose is sampled when the solver initiates at Start. That is before Mecanim/Legacy has a chance to animate so the character will be sampled in the same pose as it stands in the Scene while not in play mode. So you can make corrections to the pose in the Scene View by just rotating the bones. You can try, just break an elbow, see how it solves.

    You can resample by calling ik.solver.Initiate, but it is not really recommended, there are faster, more eficcient ways to do things, depending on what you need to change. If you just wish to change the default bending direction, you can just call ik.solver.SetLimbOrientations(BipedLimbOrientations limbOrientations) at any time.
    That I made for initiating standard structures like UMA or Max Biped in runtime independent of sampling. About that one, you can read in more detail from the User Manual.
     
    WendelinReich likes this.
  28. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
    >> check "Update When Offscreen" on the Skinned Mesh Renderer

    yes, this fixed my issue. Thanks!
     
    Partel-Lang likes this.
  29. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Thanks, i'll try!
     
  30. ColinKnueppel

    ColinKnueppel

    Joined:
    Nov 6, 2013
    Posts:
    9
    Hi,
    I'm trying to get a body aim to work with ik arms. From reading this forum, it appears that the ik is possibly solved all at once off of an initial pose. This appears to cause my ik arms to be offset by the body aim. I'd like to have the body aim execute first, and then, based on the new pose, have the arms ik execute.
    How can I do this?
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Its probably that the "body aim" is solving after the arms IK.
    disable both ik components at Start() and update their solvers manually in LateUpdate like so:
    Code (CSharp):
    1.     void Start() {
    2.         body.Disable();
    3.         hands.Disable();
    4.     }
    5.  
    6.     void LateUpdate() {
    7.         body.solver.Update();
    8.         hands.solver.Update();
    9.     }
    If your character's Animator is using the AnimatePhysics update mode, then you'll have to check if FixedUpdate has been called before you update the solvers. Let me know if you need the code for it.

    Cheers,
    Pärtel
     
  32. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi!

    Another question. Let's say you have a chess board and want to see how the arm moves and pick up something and move it and drop it in other position. Could be done with ik or it would be better to animate each positions combination?
    With the interaction solvers maybe?

    Thanks a lot!
     
  33. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Animating each position's combination reminds me the legend of the origin of chess. Point being, you'd have more combinations than you could ever animate even if you had all the animators of India. :) But thats precisely where IK can help you out. If I were you, I'd animate the hand picking up a chess button in one corner of the chess board and dropping it in the exact same position. Then, using an IK solver, you can simply offset from that. You begin with the offset of the pick up square and then use the normalizedTime of the animation to interpolate towards the offset of the drop square.

    Cheers,
    Pärtel
     
  34. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Thanks Partel. Actually the chess board was only an example. I need this for recreating a scene similar to a real war-game board. You pick up a soldier figurine and drop it in other place. Any way, from what you said, i would make the hand animation for pick up and drop, and then with, let's say LimbIk, i move the target to the position i want it to be dropped, right? I could use the full body ik too, because i want it to bend the body when the character tries to reach a position in the far side of the table. But with ththis last option, i would have a problem. The hand position i's not exactly over the figurine. because the fingers will be offsetted with the hand length. How could i fix that? With the limb ik i can set the las bone of the index finger and i could tell him to go to the exact position. but with the fullbodyik…?


    Thanks!
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Yes, thats right. With FBBIK you can solve to the finger like this:

    Code (CSharp):
    1. void Start() {
    2.         // Set the weights
    3.         ik.solver.rightHandEffector.positionWeight = 1f;
    4.         ik.solver.rightArmMapping.maintainRotationWeight = 1f;
    5.     }
    6.  
    7.     void LateUpdate() {
    8.         // Get the vector from the finger to the hand bone as in the animated pose of the arm
    9.         Vector3 fingerToHandAnimated = ik.solver.rightHandEffector.bone.position - finger.position;
    10.  
    11.         // Position the hand to the finger target but add the animated offset from the finger to the hand
    12.         ik.solver.rightHandEffector.position = fingerTarget.position + fingerToHandAnimated;
    13.     }
     
  36. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Nice! :D Thank you!

    I'll try that then.

    Cheers!
     
  37. Yokil

    Yokil

    Joined:
    Sep 9, 2012
    Posts:
    26
    Hi Partel!

    I'm developing a project using the Oculus Rift and Final IK, I'm having a big problem in applying the camera oculus rift with the first person view.

    Note: I am using the example of the scene "3rdPersonDummy" as a base.

    Can you give me a solution?

    Thanks!
     
  38. Partel-Lang

    Partel-Lang

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

    Is it DK1 or DK2? Could you be more specific, what seems to be the problem?

    Pärtel
     
  39. MarceloCosta_GamesBR

    MarceloCosta_GamesBR

    Joined:
    Jul 29, 2014
    Posts:
    7
    someone who knows how to work with FinalIK
    to make a particular example of a small demonstration
    for me to buy?
    I need to make the player foot ball go toward
    without interrupting the animation!
    someone?
     
  40. Yokil

    Yokil

    Joined:
    Sep 9, 2012
    Posts:
    26
    The version I use is the DK2; Actually I would like a sample from you, to see if my direction is correct. So I have no risk of any future error.
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hold on 7buddy and Yokil, I'll make some kind of demos for you.
    With the DK2 its difficult since I still have the old DK1, but I'll figure something out. You have problems with head position tracking because FBBIK does not have a head effector, right?
     
    MarceloCosta_GamesBR likes this.
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Ok, so import this package, that should do it. :)

    I made a script called "AnimationWarping" that you can use to warp a point from character space to world space using a weight curve by normalised time of an animation state. :)
     
  43. Yokil

    Yokil

    Joined:
    Sep 9, 2012
    Posts:
    26
    Yes, thats my problem. I'll be waiting for a response from you. Thank you for your patience.
     
  44. MarceloCosta_GamesBR

    MarceloCosta_GamesBR

    Joined:
    Jul 29, 2014
    Posts:
    7
    do you want to animated player kicking by winRar file?
    how much will you charge me?
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Here, take this package.
    So parent the head effector to the Oculus camera and you should be set. :)
    Also, before you do that, take a look at the "Head Effector" demo scene included in the package.

    Pärtel
     
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    I'm sorry I don't have time to work on your player kicking anims, I'm too busy already with FinalIK and PuppetMaster..
    But I'm sure if you take some time to look at the package I sent you, you'll be able to figure out how to do it on your own.

    Cheers,
    Pärtel
     
    MarceloCosta_GamesBR likes this.
  47. MarceloCosta_GamesBR

    MarceloCosta_GamesBR

    Joined:
    Jul 29, 2014
    Posts:
    7
    thanks friend
    i'll wait by you
    good luck
     
  48. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Hi Pärtel, the Unity 5 beta is finally available to people who preordered. Assuming you had access to a developer preview, do you already know if Final IK has any hickups on 5?
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi, yes everything seems to work nicely with Unity 5 other than the Interaction System that makes Unity crash. Maybe its a bug with the 64-bit editor, but I'll get to the bottom of this soon enough..
     
    WendelinReich likes this.
  50. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    I found the problem. Its not the Interaction System, but calling Animator.CrossFade() that will crash Unity 5.
    I submitted a report, although I bet they are already aware of a problem this big. Surely it must be fixed before they release.

    Cheers,
    Pärtel