Hi Partel,
What is the best way to calibrate height. I would like to calibrate player height at the beginning of game and then use calibration data for all levels (something like in Raw Data). Is it enough to keep only scale change of VRIK or something else also change? Another problem that I have is when I do calibration using VRIKCalibrator.Calibrate() when I rotate my arm the wrists are very thin and you can see gap between hand and arm. I'm using Strech Curve from "VRIK (Basic)" and Pilot model...View attachment 271175View attachment 271176

You can use
VRTK_SDKTransformModify class - works great in my case.

Click to expand...

One possible way might be to call DontDestroyOnLoad() on your character so it will remain unchanged when switching scenes?

Also as for the thinness of the arms, have you looked into using the provided TwistRelaxer scripts?

Hi Partel,
What is the best way to calibrate height. I would like to calibrate player height at the beginning of game and then use calibration data for all levels (something like in Raw Data). Is it enough to keep only scale change of VRIK or something else also change? Another problem that I have is when I do calibration using VRIKCalibrator.Calibrate() when I rotate my arm the wrists are very thin and you can see gap between hand and arm. I'm using Strech Curve from "VRIK (Basic)" and Pilot model...View attachment 271175View attachment 271176

You can use
VRTK_SDKTransformModify class - works great in my case.

Click to expand...

Hey,
It will be sufficient to keep the scale change consistent between the scenes as Trappist-1 kindly suggested.
If you can't use DontDestroyOnLoad for some reason, you could write the scale to PlayerPrefs and make a script that scales the character to that in the beginning of each level.

About the wrists, TwistRelaxer.cs should be part of the Final IK package. If it's not, please update to the latest.

Hey,
It will be sufficient to keep the scale change consistent between the scenes as Trappist-1 kindly suggested.
If you can't use DontDestroyOnLoad for some reason, you could write the scale to PlayerPrefs and make a script that scales the character to that in the beginning of each level.

Click to expand...

So the only thing that I should keep is scale of the character (transform) ?

Is it possible to combine LookAt IK and Rotation limit angle? I want the character's head to not turn looking backwards if the target object for LookAt is behind the player directly, so the head should not rotate a lot on the Z-Axis, I tried adding Rotation Limit (Angle) at the head component of the player but it had no effect.

Is it possible to combine LookAt IK and Rotation limit angle? I want the character's head to not turn looking backwards if the target object for LookAt is behind the player directly, so the head should not rotate a lot on the Z-Axis, I tried adding Rotation Limit (Angle) at the head component of the player but it had no effect.

Click to expand...

Not sure if this will help but I asked a similar question previously. I was able to attain the behavior I needed. Check out these posts:

I have disabled the spine bending, its similar to your problem, but only the head alone is flipping vertically to face the object that is behind the character, couldn't get your solution to work, I still have the problem.

Another question: What can I do if I want the Look At to turn the character head in a smooth way? Because I want to switch target at run time multiple times, it feels weird that the head instantly faces the new target. Also how can I clear the target? I tried setting the target to null but it continues to face the last target position.

Another question: What can I do if I want the Look At to turn the character head in a smooth way? Because I want to switch target at run time multiple times, it feels weird that the head instantly faces the new target. Also how can I clear the target? I tried setting the target to null but it continues to face the last target position.

Click to expand...

To smoothly transition between targets you could possibly use an empty gameobject that interpolates between two target gameobjects.
-----
I just took a crack at creating an example:

TransitionTarget.cs

Code (csharp):

usingUnityEngine;

usingRootMotion.FinalIK;

usingSystem.Collections;

publicclass TransitionTarget : MonoBehaviour {

/*This script is attached to the "red" cube as seen in the video - but in practice, the red cube is simply just an empty gameobject placed somewhere in your scene*/

I'm hoping to achieve a really huge win here and I'm looking for some guidance. I believe the problem I'm having is one of local coordinates and local-scaled vector math. To set up the scene, I have 2 punches with the below hypothetical characteristics:
Left jab - This punch ,when using LookAtIK such that the chest is aiming at the target's head, will naturally hit the target's right shoulder (visual left.)
Right hook - This punch , will naturally hit the target's chest on the left side (visual right.)

How might I accomplish the task of making these attacks hit any given location on the target's torso? I'm assuming I would need to first store the contact point of each attack so that I can do some math to compare the "Natural contact point" vs. the "Desired Contact Point" and then I would want to offset the LookAtIK position by that difference. In trying to accomplish this, I am having trouble figuring out how to even efficiently determine the contact points to store them in the first place, and I'm also having some trouble applying the offset, as it seems to just apply the offset in world coordinates, rather than relative to the attacker.

I need these attacks to be pin point accurate for my application.

Oh one other thing. Since I want to normally use the basic look at for my idle, adjusting the look at could cause a significant deviation of the head. Since I want the head to still be looking at the player during the attack, does it make sense to use two individual LookAtIk components, one that goes from the base of the spine up to the top of the spine (used for targeting punches) and then a 2nd one that goes up the neck to the head?

Is it possible to combine LookAt IK and Rotation limit angle? I want the character's head to not turn looking backwards if the target object for LookAt is behind the player directly, so the head should not rotate a lot on the Z-Axis, I tried adding Rotation Limit (Angle) at the head component of the player but it had no effect.

Click to expand...

Hey,

LookAtIK algorithm does not support RotationLimits. But AimIK does and it also does a very similar thing to LookAtIK, so I suggest you replace that LookAtIK with AimIK. You'll also be able to use the Pole Target and about the smooth looking, I added a new component - AimController.cs to the latest version. It handles all things like that and some more automatically. I also have LookAtController developed in a similar way for LookAtIK for the next version, let me know if you'd need that right away.

I'm hoping to achieve a really huge win here and I'm looking for some guidance. I believe the problem I'm having is one of local coordinates and local-scaled vector math. To set up the scene, I have 2 punches with the below hypothetical characteristics:
Left jab - This punch ,when using LookAtIK such that the chest is aiming at the target's head, will naturally hit the target's right shoulder (visual left.)
Right hook - This punch , will naturally hit the target's chest on the left side (visual right.)

How might I accomplish the task of making these attacks hit any given location on the target's torso? I'm assuming I would need to first store the contact point of each attack so that I can do some math to compare the "Natural contact point" vs. the "Desired Contact Point" and then I would want to offset the LookAtIK position by that difference. In trying to accomplish this, I am having trouble figuring out how to even efficiently determine the contact points to store them in the first place, and I'm also having some trouble applying the offset, as it seems to just apply the offset in world coordinates, rather than relative to the attacker.

I need these attacks to be pin point accurate for my application.

Oh one other thing. Since I want to normally use the basic look at for my idle, adjusting the look at could cause a significant deviation of the head. Since I want the head to still be looking at the player during the attack, does it make sense to use two individual LookAtIk components, one that goes from the base of the spine up to the top of the spine (used for targeting punches) and then a 2nd one that goes up the neck to the head?

Click to expand...

Hey,
Please take a look at the "Aim Swing" and "Aim Boxing" demos about how to retarget fighting animations with AimIK. There's also the "Boxing" demo that adds FBBIK to it for pinpoint accuracy.

About having 2 IK components, you can absolutely do so. You can have one LookAt/AimIK for the fighting purpose and another AimIK for the head, just need to make sure the head is updated last. IK needs to be updated in the same order as the bones that it is using are in the hierarchy. You can use the IKExecutionOrder component for that.

I've imported the project, and wanted to play around with the models like in the videos.
However, I can't even seem to select the same anchor points to move parts of the character around without breaking everything or it being ignored.

For example
- CCD IK, I hit play, go to Scene, select a chain, and it breaks it in half when I move it
- Mech Spider, same thing, the leg detaches from the body
- Aim Boxer, it completely ignores me when I move a transform, like a toe02

Are there any basic tutorials out there for someone completely new to this?

It's working fine when the character is standing still and just using the mouse to pan the camera around, however when turning the character (A and D keys rotate the character) it breaks, what I'm trying to do is it should not try to face backwards when the camera is pointing at somewhere behind the character

I've got a problem with the script execution order :/ ... I need LookAt to come before Aim, but the order always resets. I have two weapons with two AimIK scripts and I need them to execute after LookAt.

I've got a problem with the script execution order :/ ... I need LookAt to come before Aim, but the order always resets. I have two weapons with two AimIK scripts and I need them to execute after LookAt.

However if you do decide to use IKExecutionorder then what I have found is populating that list can be a little tricky, try right clicking of the elements in the list if you have to remove any of them, also when adding multiple IK components to the list from the same gameobject, the topmost IK component script will be added, then you have to re-order the components so the next IK component is on top, then you can drag it in and add it to the list.

Ok. How do I exclude bones? I have a Dynamic Bone script for a chain that is attached to the right wrist, now the right arm also aims and I've got the feeling there is something wrong, because the chain is a bit off and the arm doesn't bend. Bones shoulder, upper arm, lower arm and hand are configured in the AimIK script ...

Currently, I'm trying to introduce VRIK into my character with Vive, but it doesn't work fine.

As you can see, right knee angle is inverted. It happens on both legs and often flips between inverted and non-inverted.
When I tried with Unity-chan, it works fine (no invert happened). I modified various Right/Left leg and Locomotion params on VRIK script, but cannot be fixed. How to fix this?

Currently, I'm trying to introduce VRIK into my character with Vive, but it doesn't work fine.View attachment 271844

As you can see, right knee angle is inverted. It happens on both legs and often flips between inverted and non-inverted.
When I tried with Unity-chan, it works fine (no invert happened). I modified various Right/Left leg and Locomotion params on VRIK script, but cannot be fixed. How to fix this?

Click to expand...

It solved by doing like below.

1. Remove animator controller to disable any other animations
2. Knee default angle is set slightly bended to proper direction

Ok. How do I exclude bones? I have a Dynamic Bone script for a chain that is attached to the right wrist, now the right arm also aims and I've got the feeling there is something wrong, because the chain is a bit off and the arm doesn't bend. Bones shoulder, upper arm, lower arm and hand are configured in the AimIK script ...

Click to expand...

Ok. I fixed it ... is there anything that can't be fixed with the Script Execution Order?

I've imported the project, and wanted to play around with the models like in the videos.
However, I can't even seem to select the same anchor points to move parts of the character around without breaking everything or it being ignored.

For example
- CCD IK, I hit play, go to Scene, select a chain, and it breaks it in half when I move it
- Mech Spider, same thing, the leg detaches from the body
- Aim Boxer, it completely ignores me when I move a transform, like a toe02

Are there any basic tutorials out there for someone completely new to this?

Cheers

Click to expand...

Hey,

With the IK components you are supposed to move the targets, not the gameobjects directly. For instance in the CCD demo, you should select the gameobject that has the IK component, then the blue target in the Scene View and move that, not the individual bones in the chain:

In Aim Boxer, you can't move the toe directly because the character is animated and the Animator overwrites your changes every frame.

It's working fine when the character is standing still and just using the mouse to pan the camera around, however when turning the character (A and D keys rotate the character) it breaks, what I'm trying to do is it should not try to face backwards when the camera is pointing at somewhere behind the character

Click to expand...

Hey,
Have you tried increasing the "Clamp Weight"? It makes the character face forward when the target is behind it.

Newbe question, getting this error while trying to copy over Grounder demo.

NullReferenceException: Object reference not set to an instance of an object
RootMotion.Demos.CharacterAnimationSimple.Update () (at Assets/Plugins/RootMotion/Shared Demo Assets/Scripts/Character Controllers/CharacterAnimationSimple.cs:34)

Newbe question, getting this error while trying to copy over Grounder demo.

NullReferenceException: Object reference not set to an instance of an object
RootMotion.Demos.CharacterAnimationSimple.Update () (at Assets/Plugins/RootMotion/Shared Demo Assets/Scripts/Character Controllers/CharacterAnimationSimple.cs:34)

Does VRIK make any assumption about the default orientations of transforms in the rig?
I've been looking all over the documentation and forum for an answer to this, and can't find anything about it. Your pilot rig follows the "X axis pointing along the bone chain leading back to the root, Y axis pointing forward of the mesh". When I try to use VRIK on one of our rigs that follows a different convention, I get crazy results (character all twisted up in a crab-like position floating in the air). Is the rigging the issue, or should I be looking somewhere else?

For some reason my knee is rotating very far out of place when my character is running and it looks bad I'm not sure what is causing this issue.

My second issue is that I can't get the 2nd arm to hold onto my gun with my first hand. It matches near the default aim position but when the aim is moved to more extreme angles the 2nd hand doesn't follow the first. Below is the script I'm using for the 2nd arm.

Does VRIK make any assumption about the default orientations of transforms in the rig?
I've been looking all over the documentation and forum for an answer to this, and can't find anything about it. Your pilot rig follows the "X axis pointing along the bone chain leading back to the root, Y axis pointing forward of the mesh". When I try to use VRIK on one of our rigs that follows a different convention, I get crazy results (character all twisted up in a crab-like position floating in the air). Is the rigging the issue, or should I be looking somewhere else?

Thanks!

Click to expand...

Hey,
The only things that matter regarding bone orientations, is that VRIK like all IK components in FIK needs the targets to be oriented the same way as the bones. So for example the arm will be solved so that the hand bone rotation will match exactly with the hand target rotation.

1 more thing.. The "Wrist To Palm Axis" and "Palm To Thumb Axis" under the arms settings of VRIK depend on the hand bone orientations. You can just right-click on the VRIK's header and select "Guess Hand Orientations" from the context menu after you have replaced the character.

For some reason my knee is rotating very far out of place when my character is running and it looks bad I'm not sure what is causing this issue.

My second issue is that I can't get the 2nd arm to hold onto my gun with my first hand. It matches near the default aim position but when the aim is moved to more extreme angles the 2nd hand doesn't follow the first. Below is the script I'm using for the 2nd arm.

Hey,
About the first problem, I see you are already calling ik.solver.SetLimbOrientations which usually fixes this, so it might be an animation retargeting issue. Does it help if you enable "Foot IK" for that running animation state in the Animator? It's best to keep that enabled for all locomotion animation if you are using Humanoid animations that were not created for that character model.

About the second problem, I see you are enabling AimIK in OnEnable and also calling aim.solver.Update so AimIK is probably updating twice each frame, which might be the problem here.

I'm trying to set up a simple motion capture system using Oculus Rift + Touch, VRIK, and the experimental Unity class called GameObjectRecorder. Because VRIK is already pretty great at approximating full-body motion, ideally, I'd like to just record the whole thing as a humanoid animation, and then tweak bend goals and use bone masks for fine-tuning. Unfortunately, the class can only record generic animations so far, and I have no idea how to convert a generic animation to a humanoid within Unity.

So I tried a workaround of just recording the hand and head transforms, using your VRIK Oculus implementation and a simple mirror to pose in. I created a parent object called GameObjectRecorder with Unity's example script from the documentation, and zeroed it out. I then created empty GameObjects on the pilot's RightArmHand, LeftArmHand, and and NeckHead, zeroed them out and moved them to the GameObjectRecorder. I put a simple script on each of those empty gameobjects to make them follow the pilot's corresponding transforms in Update(). Success so far: GameObjectRecorder recorded the animations for the 3 transforms.

Then I tried (in a new scene), using the GameObjectRecorder's newly created animation, to use its children as effectors for FBBIK. It works pretty great for the hands! As long as the scale is correct, the hands and arms play out pretty much the same animation as I recorded. What I can't figure out is the head. I tried playing around with HeadEffector, and LookAtIK, but I couldn't seem to get the head animation working.

Am I going about this all wrong? Is there a better way to reverse engineer VRIK's solution than using FBBIK? Am I recording the correct transforms to use as effectors?

Any insight you could provide would be greatly appreciated.

Thanks,
-Aaron

P.s. I'm loving FinalIK. Thanks for all your hard work and dedication to support.

Edit:
I changed my GameObjectRecorder children to follow the head (under spine), left arm, and right arm effectors, and then played them back on another character with VRIK using the animated effectors. Seems to look exactly as recorded. A pretty spectacular result for a guy with zero animation experience! I'll need to play around with the elbows and legs a bit to perfect it, but all in all I'd say it is a rousing success.

I should've spent more time playing around with VRIK before asking. I figured it wasn't as easily customizable as your other components, because there's no documentation on it as of yet. Any word on when we can expect some formal documentation for VRIK? Also, where can I find information on how to properly use the bend goals for the elbows?

I have an issue with syncing positions of an arm and a gun. The arm and the gun are tracked by Vive Trackers independently.
So when a user picks up the tracked gun by the tracked arm wrist it should be in a wrist instead of flying around as on the screenshot below. I've tried to transform the arm target object to be close as possible to the gun but it seems the VRIK solver rotates and moves the arm wrist a little bit so I always see such weird result. Have you any tips?

Hey,
The only things that matter regarding bone orientations, is that VRIK like all IK components in FIK needs the targets to be oriented the same way as the bones. So for example the arm will be solved so that the hand bone rotation will match exactly with the hand target rotation.

1 more thing.. The "Wrist To Palm Axis" and "Palm To Thumb Axis" under the arms settings of VRIK depend on the hand bone orientations. You can just right-click on the VRIK's header and select "Guess Hand Orientations" from the context menu after you have replaced the character.

That's all you need to care about VRIK and bone orientations.

It does not matter, but I usually keep it on the root of the character, where the Animator is.

Hey,
About the first problem, I see you are already calling ik.solver.SetLimbOrientations which usually fixes this, so it might be an animation retargeting issue. Does it help if you enable "Foot IK" for that running animation state in the Animator? It's best to keep that enabled for all locomotion animation if you are using Humanoid animations that were not created for that character model.

About the second problem, I see you are enabling AimIK in OnEnable and also calling aim.solver.Update so AimIK is probably updating twice each frame, which might be the problem here.

Best,
Pärtel

Click to expand...

I've enabled Foot IK for the animations but the problem persists. I'm using animations made for this character model but the model isn't fully compatible with the humanoid so I get warnings on the import about the head and neck. So I check the Generate Retargeting Quality Report and it gives me
LeftFoot average position error 0.4 mm and maximum position error 2.1 mm at time 0:13 (72.2%) Frame 13
LeftFoot average position error 0.3 mm and maximum position error 2.3 mm at time 0:4 (22.2%) Frame 14
Not sure if that may be responsible for the issue or not.

Also for the 2nd issue when I set the aim.enabled to false only the gun is forced on target and the left and right arm don't move up and down with the aim like they do if I have the AimIK script enabled so it seems like I'm missing a step somewhere in the update. I've basically just copied the AnimatorControllerThirdPersonIK script.

I'm trying to set up a simple motion capture system using Oculus Rift + Touch, VRIK, and the experimental Unity class called GameObjectRecorder. Because VRIK is already pretty great at approximating full-body motion, ideally, I'd like to just record the whole thing as a humanoid animation, and then tweak bend goals and use bone masks for fine-tuning. Unfortunately, the class can only record generic animations so far, and I have no idea how to convert a generic animation to a humanoid within Unity.

So I tried a workaround of just recording the hand and head transforms, using your VRIK Oculus implementation and a simple mirror to pose in. I created a parent object called GameObjectRecorder with Unity's example script from the documentation, and zeroed it out. I then created empty GameObjects on the pilot's RightArmHand, LeftArmHand, and and NeckHead, zeroed them out and moved them to the GameObjectRecorder. I put a simple script on each of those empty gameobjects to make them follow the pilot's corresponding transforms in Update(). Success so far: GameObjectRecorder recorded the animations for the 3 transforms.

Then I tried (in a new scene), using the GameObjectRecorder's newly created animation, to use its children as effectors for FBBIK. It works pretty great for the hands! As long as the scale is correct, the hands and arms play out pretty much the same animation as I recorded. What I can't figure out is the head. I tried playing around with HeadEffector, and LookAtIK, but I couldn't seem to get the head animation working.

Am I going about this all wrong? Is there a better way to reverse engineer VRIK's solution than using FBBIK? Am I recording the correct transforms to use as effectors?

Any insight you could provide would be greatly appreciated.

Thanks,
-Aaron

P.s. I'm loving FinalIK. Thanks for all your hard work and dedication to support.

Edit:
I changed my GameObjectRecorder children to follow the head (under spine), left arm, and right arm effectors, and then played them back on another character with VRIK using the animated effectors. Seems to look exactly as recorded. A pretty spectacular result for a guy with zero animation experience! I'll need to play around with the elbows and legs a bit to perfect it, but all in all I'd say it is a rousing success.

I should've spent more time playing around with VRIK before asking. I figured it wasn't as easily customizable as your other components, because there's no documentation on it as of yet. Any word on when we can expect some formal documentation for VRIK? Also, where can I find information on how to properly use the bend goals for the elbows?

Thanks again!

Click to expand...

Hey,
About recording the IK, I am actually working on a baking tool that would enable you to bake the IK directly to Humanoid/Generic/Legacy animation clips. If you'd be interesting in beta testing that, please write to me support@root-motion.com or PM.

I'm still working on a couple of additional features for VRIK and once that's done, I'll make some formal documentation pages. Anyway, for now all the info that will go to that documentation is already in the tooltips of the VRIK component.

About the bend goals, just assign a gameobject as the "Bend Goal", set "Bend Goal Weight" to 1 and the arm will be bent towards that gameobject.

I have an issue with syncing positions of an arm and a gun. The arm and the gun are tracked by Vive Trackers independently.
So when a user picks up the tracked gun by the tracked arm wrist it should be in a wrist instead of flying around as on the screenshot below. I've tried to transform the arm target object to be close as possible to the gun but it seems the VRIK solver rotates and moves the arm wrist a little bit so I always see such weird result. Have you any tips?

Hey,
Please pause the game, then check if hand bone positions/rotations match with the IK targets. If they do, that means the IK is working just fine and you'll have to adjust the pivots of the IK targets. Are you sure the pivot of the gun matches exactly the tracker position on the gun controller? Even if you manage to get the pivots exactly right, I bet there will be some minor but still annoying drifting of the gun due to tracking error, so you might want to parent the gun to the hand when it's picked up.

I've enabled Foot IK for the animations but the problem persists. I'm using animations made for this character model but the model isn't fully compatible with the humanoid so I get warnings on the import about the head and neck. So I check the Generate Retargeting Quality Report and it gives me
LeftFoot average position error 0.4 mm and maximum position error 2.1 mm at time 0:13 (72.2%) Frame 13
LeftFoot average position error 0.3 mm and maximum position error 2.3 mm at time 0:4 (22.2%) Frame 14
Not sure if that may be responsible for the issue or not.

Also for the 2nd issue when I set the aim.enabled to false only the gun is forced on target and the left and right arm don't move up and down with the aim like they do if I have the AimIK script enabled so it seems like I'm missing a step somewhere in the update. I've basically just copied the AnimatorControllerThirdPersonIK script.

Click to expand...

Hey,
One more thing to try. Could you go to the avatar configuration scene and decrease the max value of "Lower Leg Stretch" for both legs under Muscles & Settings?

If that doesn't help either, could you send me that character fbx and that animation fbx so I could take a look myself?
If you can send a repro project, I could also help you with that other problem, very difficult to guess what might be set up wrong there without being able to see it.

Hi, I just bought Final IK and I'm wondering if there's a built-in or best practice to manipulate the end of a CCD chain using a physics-based VR interaction system (steamVR)?I 've accomplished it in a pretty hacky way updating the position of the target gameobject (Which I can't seem to manipulate with rigidbody interactions) with another gameobject that I can set up to interact with, but I'm assuming there's a better way to do this. Any pointers are appreciated, thank you.
Also, I'm attempting to use this to rig surgical booms. Would you use CCD for that? (lots of rotational limits)

Hey,
The error occurs because there is no Animator on that GameObject or any of it's children. Where is that spider's Animator?

Click to expand...

Well, not sure. I have these working using Nav mesh fine in another project. Wanted to add IK, so just brought a prefab into your demo scene and copied over the bot IK stuff. Here is an animator property on the spider.

Hi, I just bought Final IK, and are going through the demos. FirstPersonAim and FirstPersonRecoil has some glitches when you enable "Animate Physics" on the demo. It seems like the aim is lost in a frame or two, any now and then, which causes some screen flickering. It is also present when I build and run the scene.

I believe that final IK should work with physics, so can there be any setting in the rendering setup or similar that causes this problem?

Hello ! I hope i'm not asking something already answered, i read a few pages, some issues sounds similar but i didn't find out if i could translate the explanations to my problem.

I'm using AimIK on the head of the player so it follows the camera direction, it works great.
When the player shoot, i'm using the head as the initial position/rotation for the projectile, again it works.
But i just added the option to set a delay before some projectile are launched, for this, i simply added "yield return new WaitForSeconds(preparationTime);" since i'm already using a coroutine to manage the shooting action.
But here is my problem, when i do this, the moment i read the head position/rotation in the coroutine, it's not retargeted by the AimIK.

I guess it has something to do with the execution order but i've no idea how to solve this in the context of a coroutine, i saw people talking about "IKExecutionOrder" on this very page but don't understand how to use it or if it's what i need.

I bought both Final IK and Puppetmaster, and haven’t begun using them yet, but I’ve read through most of this thread now. I saw the mention that there’s no recovery from the stagger state, it’s really meant for falling, and I tried the FBBIK boxing example, and you can move the target so far so the avatar is unnaturally diagonal. So Puppetmaster adds falling, but there’s no support for having him instead take a step forward?

So, if one would manually add a center of gravity check, the first thing a human biped would do would be to move the foot with the least weight on, to a target on the opposite side of the center of gravity. This should move the position of the player gameobject as well, so I wonder if it’s outside of the scope of this asset...

To follow on the first question, there’s no self balancing support in this asset? It looks as if the VRIK setup can reposition the feet automatically, but this hasn’t been ported to the FBBIK solver?

I’ve seen a few different IK implementations on YouTube where you can just move a target and the entire IK body walks right over to it, but that is not a feature of Final IK or Puppetmaster so far?

EDIT: The Final IK + Puppetmaster Stagger Demo and a few others simply fall through the floor when you try them (Unity 2017.4.0f1).

EDIT: Tried 2018.1.0b13 now as well, and many demos still fall through the floor, and for example, in the Puppet Extended demo, the balls you shoot at the puppet flies straight through without colliding with it.

Hi, I just bought Final IK, and are going through the demos. FirstPersonAim and FirstPersonRecoil has some glitches when you enable "Animate Physics" on the demo. It seems like the aim is lost in a frame or two, any now and then, which causes some screen flickering. It is also present when I build and run the scene.

I believe that final IK should work with physics, so can there be any setting in the rendering setup or similar that causes this problem?

Click to expand...

OK, figured the problem. Animator update mode was not set to "Animate Physics".

Hey! I am trying to use props on my VR ragdoll. They seem to work well until I introduce a more complex object. I have a revolver that uses a joint for its cylinder so it can rotate and open for reloading. How would I go about getting the prop system to work for this?

When I use Grounder FBBIK it pulls the character down so its feet touch ground, but the Y position stays the same. Is it possible to see what's the Y position when Grounder FBBIK is active so I can use it in my script as a starting point even if the grounder FBBIK is not active?

Hey,
About recording the IK, I am actually working on a baking tool that would enable you to bake the IK directly to Humanoid/Generic/Legacy animation clips. If you'd be interesting in beta testing that, please write to me support@root-motion.com or PM.

I'm still working on a couple of additional features for VRIK and once that's done, I'll make some formal documentation pages. Anyway, for now all the info that will go to that documentation is already in the tooltips of the VRIK component.

About the bend goals, just assign a gameobject as the "Bend Goal", set "Bend Goal Weight" to 1 and the arm will be bent towards that gameobject.

Hey,
Please pause the game, then check if hand bone positions/rotations match with the IK targets. If they do, that means the IK is working just fine and you'll have to adjust the pivots of the IK targets. Are you sure the pivot of the gun matches exactly the tracker position on the gun controller? Even if you manage to get the pivots exactly right, I bet there will be some minor but still annoying drifting of the gun due to tracking error, so you might want to parent the gun to the hand when it's picked up.

Hey,
One more thing to try. Could you go to the avatar configuration scene and decrease the max value of "Lower Leg Stretch" for both legs under Muscles & Settings?

If that doesn't help either, could you send me that character fbx and that animation fbx so I could take a look myself?
If you can send a repro project, I could also help you with that other problem, very difficult to guess what might be set up wrong there without being able to see it.

Cheers,
Pärtel

Click to expand...

I figured out the first problem, it was an issue with the avatar settings. I had allow DoF translation setting checked. When I unchecked it the leg issue went away.
Unfortunately it's very hard to make a repro project for my game. I investigated the 2nd problem more fully and found that when I draw the weapon out the first time the aiming works perfectly with the second hand now after adjusting some settings, however when I pull out the gun additional times the aiming chain gets stuck so to speak. I'm tweening the aim IKPositionWeight while drawing and holstering the gun. If I don't call aim.Update() until IKPostionWeight is 1 then there is no problem either, but when I call aim.Update() while increasing IKPositionWeight from 0 to 1 something along the line prevents the aim from fully getting into the position it would get to if I had only called update once IKPositionWeight got to 1. I'm having trouble figuring out what is blocking the aim.Update() from using the current IKPositionWeight instead of the value it first receives.

I have issues with colliders when used with VRIK. The colliders on childs of GameObject with VRIK are not alligned (they have the same position as without VRIK or as if IK Weight = 0).

This is what it looks like:

As you can see all the colliders are positioned incorrectly. When I was going through the forum I noticed issue related to mine and back then you said that in the VRIK Basic scene you tried adding collider + rigidbody on hand and it worked. So I tried it there and VRIK + Colliders really works in that demo scene without problem, so I started searching what is different and I found out that there is general problem in VRIK. The demo scene worked only because there are multiple VRIK instances, once you will remove one out of those 3 characters, colliders became immediately incorrect. Example (one sphere collider + rigidbody on the head bone of the pilot):

After this I was searching more and discovered that there is always one character that doesn't work. It seems that it is always the last one added. So If you have 2 characters then first works ok and second is broken. Adding 3rd solves the second one, but doesn't work itself. However it doesn't always work that way, since I need only one character I tried to solved this problem by adding another character outside of the map, but even though the colliders on the main character were align properly (at least in the physics debug window) once I tried the collision with some other colliders they were still only colliding on places were colliders would be without VRIK and not on position where the characters and bones were actually displayed.

I've seen those errors, they happen when VRIK updates on a character that is already in a mathematically invalid state. The last time I saw this, it turned out the developers had player height missing in their calibration data so the scale of the character was set to (0, 0, 0) and then the IK failed on that producing the same errors.
It also happens to characters that have been blasted away to infinity by some erroneous code.

Do you have any code that handles the situation when the controllers leave the tracked area and does anything with the character?

Click to expand...

Hi,
sorry for the long delay.

- We don't have any code that handles the controllers leave the tracked area.

- We have a character height calibration system but this modifies the scale only once and the characters are fine then, the error occured far later. (So i ruled that out)

- I programmed a workaround which checks the position every frame to NaN and sets it to 0, when the error occurs. This helps sometimes. But there seams to be a second variant of this error that continuesly sets the position to NaN. Then we get only one error message:

Some additional information which might be helpfull:
- We use vrik.solver.AddPlatformMotion() for detecting teleportation, which is our main way of moving the character
- The Player can change the charcter model. When he does that, VRIK gets reinitialized and the character reapears
- It also happened when the HMD stayed in the tracked area
- The position data comes not directly form the HMD but is relayed through Unity Photon Networking. We build a multiplayer application and VRIK runs on more then one client and on multliple player objects. The error occured simultaneusly on every one of them.

Is there any way to get the limb stretching feature that was added to VRIK in the 1.7 into the 1.6 release? I have everything I want working nicely with 1.6, but the jump to 1.7 adds other unexpected behavior to VRIK that I don't want. I tried copy/pasting the IKSolverVRArm class from 1.7 into my project over the existing 1.6 version but it didn't work.

Hi, I just bought Final IK and I'm wondering if there's a built-in or best practice to manipulate the end of a CCD chain using a physics-based VR interaction system (steamVR)?I 've accomplished it in a pretty hacky way updating the position of the target gameobject (Which I can't seem to manipulate with rigidbody interactions) with another gameobject that I can set up to interact with, but I'm assuming there's a better way to do this. Any pointers are appreciated, thank you.
Also, I'm attempting to use this to rig surgical booms. Would you use CCD for that? (lots of rotational limits)

Click to expand...

Hey, If you want physical interactions, I would probably be best to set the rig up with Rigidbodies, Joints and Colliders. You can use a very high drag value to keep the links stead and make everything kinematic while you are not interacting with it. You can use a kinematic rigidbody and a joint as the end effector that you manipulate.

Well, not sure. I have these working using Nav mesh fine in another project. Wanted to add IK, so just brought a prefab into your demo scene and copied over the bot IK stuff. Here is an animator property on the spider.
View attachment 272715

Click to expand...

Hey,

If you open CharacterAnimationSimple.cs, it uses

Code (CSharp):

animator = GetComponentInChildren<Animator>();

in Start, so line 34 can through a null reference exception only if there is no Animator on the gameobject that has the CharacterAnimationSimple.cs component or on any of it's children.

Hello ! I hope i'm not asking something already answered, i read a few pages, some issues sounds similar but i didn't find out if i could translate the explanations to my problem.

I'm using AimIK on the head of the player so it follows the camera direction, it works great.
When the player shoot, i'm using the head as the initial position/rotation for the projectile, again it works.
But i just added the option to set a delay before some projectile are launched, for this, i simply added "yield return new WaitForSeconds(preparationTime);" since i'm already using a coroutine to manage the shooting action.
But here is my problem, when i do this, the moment i read the head position/rotation in the coroutine, it's not retargeted by the AimIK.

I guess it has something to do with the execution order but i've no idea how to solve this in the context of a coroutine, i saw people talking about "IKExecutionOrder" on this very page but don't understand how to use it or if it's what i need.

Click to expand...

Hey,
FIK components are normally updated in LateUpdate, after the animation. Coroutines in Unity are fired before that if you shoot a projectile from a coroutine, it will shoot form a pre-IK position of the bone. You can use that coroutine to raise a flag instead

Code (CSharp):

shootProjectile =true;

, then use that flag to fire a projectile in LateUpdate from a script that has been set to a higher value than AimIK in the Script Execution Order.

I bought both Final IK and Puppetmaster, and haven’t begun using them yet, but I’ve read through most of this thread now. I saw the mention that there’s no recovery from the stagger state, it’s really meant for falling, and I tried the FBBIK boxing example, and you can move the target so far so the avatar is unnaturally diagonal. So Puppetmaster adds falling, but there’s no support for having him instead take a step forward?

So, if one would manually add a center of gravity check, the first thing a human biped would do would be to move the foot with the least weight on, to a target on the opposite side of the center of gravity. This should move the position of the player gameobject as well, so I wonder if it’s outside of the scope of this asset...

To follow on the first question, there’s no self balancing support in this asset? It looks as if the VRIK setup can reposition the feet automatically, but this hasn’t been ported to the FBBIK solver?

I’ve seen a few different IK implementations on YouTube where you can just move a target and the entire IK body walks right over to it, but that is not a feature of Final IK or Puppetmaster so far?

EDIT: The Final IK + Puppetmaster Stagger Demo and a few others simply fall through the floor when you try them (Unity 2017.4.0f1).

EDIT: Tried 2018.1.0b13 now as well, and many demos still fall through the floor, and for example, in the Puppet Extended demo, the balls you shoot at the puppet flies straight through without colliding with it.

Click to expand...

Hey,
Falling through the floor probably happens not because of the Unity version, but because you have imported PM to a project that has a different Layer Collision Matrix than what the default Unity project has. Try importing to a new empty project.

About taking steps towards to the target, that is best solved by simple locomotion animation. So if the target is too far from the root of the character, use a standard 8-direction strafing locomotion blend tree (such as the "Grounded Strafe" state in "Humanoid Third Person" animator controller) to move the character closer to the target.

Hey! I am trying to use props on my VR ragdoll. They seem to work well until I introduce a more complex object. I have a revolver that uses a joint for its cylinder so it can rotate and open for reloading. How would I go about getting the prop system to work for this?

Click to expand...

Hey,
I'm sorry, were you referring to the InteractionSystem in FIK or the Prop system in PuppetMaster?
How exactly does that barrel joint mess up the prop system?

When I use Grounder FBBIK it pulls the character down so its feet touch ground, but the Y position stays the same. Is it possible to see what's the Y position when Grounder FBBIK is active so I can use it in my script as a starting point even if the grounder FBBIK is not active?

Click to expand...

Hey,
If Grounder's IK component is not active the grounder will not update.
Normally you could get the y position offset applied by the Grounder by using the grounder.OnPostGrounder delegate
and reading grounder.solver.pelvis.IKOffset from there, but that won't be called if FBBIK is disabled.

I figured out the first problem, it was an issue with the avatar settings. I had allow DoF translation setting checked. When I unchecked it the leg issue went away.
Unfortunately it's very hard to make a repro project for my game. I investigated the 2nd problem more fully and found that when I draw the weapon out the first time the aiming works perfectly with the second hand now after adjusting some settings, however when I pull out the gun additional times the aiming chain gets stuck so to speak. I'm tweening the aim IKPositionWeight while drawing and holstering the gun. If I don't call aim.Update() until IKPostionWeight is 1 then there is no problem either, but when I call aim.Update() while increasing IKPositionWeight from 0 to 1 something along the line prevents the aim from fully getting into the position it would get to if I had only called update once IKPositionWeight got to 1. I'm having trouble figuring out what is blocking the aim.Update() from using the current IKPositionWeight instead of the value it first receives.

Click to expand...

Hey,
I'd focus on why the IK works the first time and doesn't work the second time. Something must be changing with the process. Do you have "Fix Transforms" enabled in the IK component? If it's not, maybe you have some unanimated bones used bu IK that get rotated off and won't reset. If you could run 2 characters in an isolated scene. Draw the gun on one of them once, then check the bones and other objects in the hierarchy to see what is different on the two characters.

As you can see all the colliders are positioned incorrectly. When I was going through the forum I noticed issue related to mine and back then you said that in the VRIK Basic scene you tried adding collider + rigidbody on hand and it worked. So I tried it there and VRIK + Colliders really works in that demo scene without problem, so I started searching what is different and I found out that there is general problem in VRIK. The demo scene worked only because there are multiple VRIK instances, once you will remove one out of those 3 characters, colliders became immediately incorrect. Example (one sphere collider + rigidbody on the head bone of the pilot):

After this I was searching more and discovered that there is always one character that doesn't work. It seems that it is always the last one added. So If you have 2 characters then first works ok and second is broken. Adding 3rd solves the second one, but doesn't work itself. However it doesn't always work that way, since I need only one character I tried to solved this problem by adding another character outside of the map, but even though the colliders on the main character were align properly (at least in the physics debug window) once I tried the collision with some other colliders they were still only colliding on places were colliders would be without VRIK and not on position where the characters and bones were actually displayed.

Click to expand...

Hey,
Can't think of a reason why this would happen. Tried adding a collider to the Pilot's head and deleting other characters, but seemed to work fine. Which Unity version are you using?

- We don't have any code that handles the controllers leave the tracked area.

- We have a character height calibration system but this modifies the scale only once and the characters are fine then, the error occured far later. (So i ruled that out)

- I programmed a workaround which checks the position every frame to NaN and sets it to 0, when the error occurs. This helps sometimes. But there seams to be a second variant of this error that continuesly sets the position to NaN. Then we get only one error message:

Some additional information which might be helpfull:
- We use vrik.solver.AddPlatformMotion() for detecting teleportation, which is our main way of moving the character
- The Player can change the charcter model. When he does that, VRIK gets reinitialized and the character reapears
- It also happened when the HMD stayed in the tracked area
- The position data comes not directly form the HMD but is relayed through Unity Photon Networking. We build a multiplayer application and VRIK runs on more then one client and on multliple player objects. The error occured simultaneusly on every one of them.

Click to expand...

Hey,
It's will probably be very difficult to solve based on descriptions, any chance you could send me the project so I could run it in the Editor?

If you are teleporting, just move the character and call ik.solver.Reset() after that.

Is there any way to get the limb stretching feature that was added to VRIK in the 1.7 into the 1.6 release? I have everything I want working nicely with 1.6, but the jump to 1.7 adds other unexpected behavior to VRIK that I don't want. I tried copy/pasting the IKSolverVRArm class from 1.7 into my project over the existing 1.6 version but it didn't work.

Please advise, thanks!

Click to expand...

Hey,
Copy the IKSolverVRArm as you did, then you'll also need to copy the code from

Code (CSharp):

publicoverridevoid FixTransforms()

and

Code (CSharp):

privatevoid WriteTransforms()

from IKSolverVR.cs.
May I ask what exactly was the unexpected behavior keeping you from updating to 1.7?

Hey,
I'm sorry, were you referring to the InteractionSystem in FIK or the Prop system in PuppetMaster?
How exactly does that barrel joint mess up the prop system?

Click to expand...

I was referring to the PuppetMaster Prop system. The cylinder where I load bullets into is attached to the revolver with a joint. It seems to lag behind the revolver when the revolver is attached via the prop system.

- We don't have any code that handles the controllers leave the tracked area.

- We have a character height calibration system but this modifies the scale only once and the characters are fine then, the error occured far later. (So i ruled that out)

- I programmed a workaround which checks the position every frame to NaN and sets it to 0, when the error occurs. This helps sometimes. But there seams to be a second variant of this error that continuesly sets the position to NaN. Then we get only one error message:

Some additional information which might be helpfull:
- We use vrik.solver.AddPlatformMotion() for detecting teleportation, which is our main way of moving the character
- The Player can change the charcter model. When he does that, VRIK gets reinitialized and the character reapears
- It also happened when the HMD stayed in the tracked area
- The position data comes not directly form the HMD but is relayed through Unity Photon Networking. We build a multiplayer application and VRIK runs on more then one client and on multliple player objects. The error occured simultaneusly on every one of them.

Click to expand...

Hi Pärtel,
I'm having the same problem as this user.

Basically sometimes the character vanish, and there is NaN errors.
when this happens unity tells that the VRIK character is too far away or in invalid position.
There is a way to reset the character if something like this happens?

don't seems that the problem is related to the controller or oculus position.
now i will try to detect difference in distances on headset and controllers to detect lost tracking, so maybe this will solve the problem.

But as I said, I want to Know if there is a way to reset the character to make him appear again, and make him behave like if is following head and controllers.
Thanks!

Oops...

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.