Hey,
CCD and FABRIK are not able to solve for the rotation of the target, it’s just the nature of the algorithms. I might have a solution for you though, could you please give me a screenshot of the mech arms?
Best,
Pärtel
Hey,
CCD and FABRIK are not able to solve for the rotation of the target, it’s just the nature of the algorithms. I might have a solution for you though, could you please give me a screenshot of the mech arms?
Best,
Pärtel
Hi! Maybe its not the right place to ask, but i am going to buy this asset and just want verify before, is it possible to change constraints for joints throw code? And please, can you give me some small tip what type of 3d object do i need.I tried another scripts with just rigged 3d model and sure it didnt work because I am missing something.How to connect all part together, now its just parts of model. Thank you in advance:)
Hey. I was having some problems but I fixed them. Thought I’d post the solution here in case it could be implemented in the official version, or maybe helps someone else.
I was having problems automatically hooking up VRIK on characters that had no shoulders. It would just throw a ton of out of bounds errors and leave them in a t-pose. My solutions is as follows:
//in IKSolverVRArm.cs
//line 125 - 128
private VirtualBone shoulder { get { return bones[0]; }}
private VirtualBone upperArm { get { return bones[hasShoulder? 1 : 0]; }}
private VirtualBone forearm { get { return bones[hasShoulder ? 2 : 1]; }}
private VirtualBone hand { get { return bones[hasShoulder ? 3 : 2]; }}
//line 347
VirtualBone.SolveTrigonometric(bones, 0, 1, 2, position, GetBendNormal(position - upperArm.solverPosition), positionWeight);
This way it actually handles a lack of shoulder bones better.
Hi, I’m getting another problem.
Using the VRIK solver, I will sometimes get models that will have very thrusty hips. in this case both the shoulders and hips are rotating quite a bit from pretty subtle movements. I’ve played with a lot of settings and can’t find anything that will turn this down but still look reasonable. I’m not using any feet or hip trackers. Just the head and hands.
I’ve tried to fix this by selecting different bones in the humanoid configuration. Sometimes it’ll fix things and sometimes it won’t. The application I’m working on allows users to import their own characters, so it’s important that the solution will be able to automatically apply itself, and doesn’t need too much manual labor to get it looking right.
This is what a normal character will look like: And this is a thrusty character:


Here’s my VRIK settings:
Any help would be appreciated. We’ve been struggling with this for a while and can’t find a good solution.

Sure, heres a picture:

I’ve solved the left hand. The wrist is solved to the target position and then the hand is rotated to match the target rotation.
The right gun-arm is a bit more tricky… I want the gun to have a rotation limit applied. So I guess I’m looking for a way to combine an aim-ik with a ccdik. A solution which solves both of these would probably do what I’m looking for.
Hey,
Did you mean by joint constraints the limits on their rotation?
In Final IK only CCDIK, FABRIK and AimIK are able to use rotation limits on the joints. In FullBodyBipedIK and VRIK the joints are not limited, but a there are internal constaints in the solver that try to keep the bones angled right.
About the type of 3D object you need, Final IK works on any character that has a hierarchical bone structure so normally it’s nothing you have to worry about.
Hey,
Thanks for that, it is a known issue and has already been fixed for the next version.
Hey,
Could you please send me that weird teddy character fbx with VRIK on it with those settings (support@root-motion.com)?
I’ve seen this issue before in games, but haven’t found a good way to reproduce it yet.
Hey,
You could run LimbIK on that gun arm to get it positioned roughly where you need it to be, then use AimIK on top of it to take care of the aiming.
Assign spine and left arm bones to AimIK. You’ll have to add IKExecutionOrder.cs to make AimIK solve after LimbIK.
CCD and AimIK can’t be combined to work like that, they’ll start fighting each other.
Best,
Pärtel
Hi All, Today (Saturday 4th of August) I will have a live dev interview with the creator of #FinalIK & #PuppetMaster > RootMotion on my twitch stream!
So pop in and feel free to ask any questions you like in chat as i check out Final IK and PuppetMaster.
9pm UK time, 4pm ET, 3pm CT, 1pm PDT Live Unity Game Dev!!!
Twitch
Using FBBIK with Grounder FBBIK and the character model keeps randomly disappearing on start. You can still see the character’s capsule collider just no mesh rendering even though the mesh renderers are enabled. If I disable these two scripts the issue goes away. Any ideas?
Pärtel,
as always, thank you for your answer and always being present on the threads :).
What would be a good way to pickup a gun from a hip holster using VRIK, thinking of the different stances the avatar (walk, crouch, fly, idle) could be in? I had a few shots at it, having the gun parented to the right thigh and am a little unsure what the best way is.
a) Using an animation, it of course fails to align the hand with the gun as soon as an idle animation is playing underneath.
b) Setting the gun as VRIK right hand target, this seems to be more or less exact depending on what the gun is parented to (checking while idle animation is playing). Parenting the gun to Pelvis instead of right thigh seemed to give a more exact placement of the hand on the gun.
My next approach would be to unparent the gun from the character rig, have its transform follow an attachpoint on the rig, then start playing a “grab” animation and also weighting in the VRIK right hand weights, as well as the finger rotations using your scripts from your post #2920 from Dec 1st ( https://discussions.unity.com/t/525769 page-59#post-3307469).
Hey @Partel-Lang , just bought the plug-in and love it! Building on your interaction tutorial where you are picking up a sphere and sending a OnPickUp event, I’m trying to have the character pick up, pause, then replace an object back to it’s original position and rotation. Couple of questions on this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RootMotion.FinalIK;
public class PickupObject : MonoBehaviour {
private InteractionObject m_object;
// Offset when character is looking at item
public Vector3 holdOffset;
// Offset calculated to return item
private Vector3 returnOffset;
private float m_holdWeight, m_returnWeight;
private FullBodyBipedIK m_ik= null;
// Object initial transform
private Transform m_originalPosition;
private Vector3 startingPosition;
bool pickUpState = true;
private void Awake()
{
m_object = GetComponent<InteractionObject>();
m_originalPosition = this.transform;
}
IEnumerator OnPickUp()
{
m_ik = m_object.lastUsedInteractionSystem.GetComponent<FullBodyBipedIK>();
while (m_holdWeight < 1.0f )
{
m_holdWeight += Time.deltaTime;
yield return null;
}
// Pause
yield return new WaitForSeconds(1.0f);
// now calculate starting position of hand which we'll lerp to in Late Update
startingPosition = m_ik.solver.leftHandEffector.position;
pickUpState = false;
// To return it to it's original position, we calculate a new hold offset
while ( m_returnWeight<1.0f )
{
m_returnWeight += Time.deltaTime;
yield return null;
}
}
private void LateUpdate()
{
if (m_ik == null) return;
if (pickUpState)
{
// m_ik.transform.rotation keeps it in local space.
m_ik.solver.leftHandEffector.positionOffset += m_ik.transform.rotation * holdOffset * m_holdWeight;
}else if ( pickUpState == false)
{
m_ik.solver.leftHandEffector.position = m_ik.transform.rotation * Vector3.Lerp(startingPosition, m_originalPosition.position, m_returnWeight);
}
}
}
I’m having issues with LookAt IK.
It seems to work differently depending on the pose of when its first enabled.
Is there a full proof way I can make sure my character looks forward correctly every time?
For instance, is it possible to have the target first assigned to a temp Transform that is straight ahead (maybe even parented to the head of the character), enable it and then switch the target to the real target?
This issue comes up every once in a while and I want to fix it permanently.
Hey,
Does enabling “Update When Offscreen” on the SkinnedMeshRenderer and setting “Culling Mode” to “Always Animate” on the Animator help? Sounds like the IK is pulling the character out of mesh renderer’s bounds so it gets culled. There’s no way to update said bounds unfortunately.
Hey,
That’s a bit tricky stuff, as you can’t parent an object that you want to interact with IK to the hierarchy that is used by that IK. I mean you can, but as that object’s parent moves by the effect of IK, after the IK it won’t be where it was when the IK target was read so the hand will end up offset. It’s a circular dependency thing. In Dead and Buried I did the holstering by additional LimbIK on the arms that runs on top of VRIK. That LimbIK is weighed in only when the holsters are used and then you can set the LimbIK target to an object parented to the body, as the body is not used by the LimbIK.
Hey and thanks for the purchase!
If you go to the “Interaction” scene, click on the “Ball” gameobject and set “Reset Delay” to a high value like 100 or something in the ResetInteractionObject component just so it wouldn’t drop the ball right away. Then play the scene and click to pick up the ball. Once you have the ball, move the right hand effector’s position weight slighter to 1. Hand effector position was left to where the ball was picked up so the dummy moves the ball back to where it was. At that point you can just unparent the ball. That’s how you should be able to do it.
Hey,
Yes, the IK samples the pose when it first initiates to find out which axes of the bones face forward and stuff like that.
You should start with LookAtIK enabled and disable it after it initiates.
You can do so by using the solver.OnPostInitiate delegate:
void Awake()
{
ik.solver.OnPostInitiate += OnPostInitiate;
}
void OnPostInitiate()
{
ik.enabled = false;
}
or by just checking ik.solver.initiated in an update loop and disabling it if it returns true.
Cheers,
Pärtel
Thanks for the code. I was disabling the component onEnable in my script and it probably didn’t finish initialization.
Hi @Partel-Lang ,
I’m using Final IK mostly ( for now) for Foot IK. With the character controller I’m using, I have no choice to have a capsule collider. Problem is a high step like this (see pic) the collider doesn’t move up, whatever the capsule radius and the zero friction applied.
I know i can shorten to the capsule and/or move it up a bit but how do i detect that exact moment like we see on the pic where the foot is planted on a specfic IK position ?
If I’m using grounder.solver.Leg[1].isGrounded , it’s also detecting when is ground on normal position.
Maybe some of you having other tricks to achieve same result.
Thx
Hi Pärtel,
thanks for your reply. I would try to avoid using another solver on top, if possible. Doing some more tests, it seems to work out fine if I keep the gun outside the character armature. Unless you recommend otherwise, I will follow this route.
InteractionOject seems to have everything needed for that. I may try to come up with a barebones InteractionSystem for VRIK on basis of FBBIK InteractionSystem. Would you consider moving positionWeight and rotationWeight of the BodyParts to the base class and exposing a GetEffector()/GetBodyPart() on the IKSolverVR in a future iteration of VRIK? This would allow a similar lean code as is currently on the FBBIK InteractionObject:
solver.GetEffector(effector).positionWeight = Mathf.Lerp(solver.GetEffector(effector).positionWeight, value, weight);
Is there any way to invert the bend of a Limb IK? It’s bending the wrong way on my quadraped’s front legs and the trig limbs are having some wonky behavior
Hey,
You could use grounder.solver.legs[0].IKOffset to determine how high the foot is, but you can’t get the information about if the foot is planted or not. Grounder simply does not know or care about that. All it does, is offset the feet based on ground height. isGrounded only lets you know if there is ground within stepDistance beneath the foot.
Increasing collider radius helps with sliding over obstacles, but you can’t increase it too much as the character won’t be able to get close to walls at some point. You could actually create 2 colliders for that Rigidbody. One is on a layer that collides with the walls and is a thin capsule collider. The other is on a layer that only collides with walkable surfaces and is a big sphere collider that can slide over just about anything.
Another option would be to create a hovering character controller, that has a thin capsule and that spherecasts down to find ground height and makes the rigidbody hover a few feet above it by adjusting Rigidbody.velocity.y. Should work like car suspension.
Hey,
Yeah, if you keep the gun outside of character armature and update it’s position by script, the IK will work, although it will lag a frame behind (that’s why it works), but I’m sure it would not be noticable.
About the VRIK InteractionSystem, VRIK is a completely different solver internally and actually it doesn’t even have effectors, so it’s not that easy. I have avoided doing something like IS for VRIK because in VR you can just move your hands to wherever they need to be. To interact with objects, all you need to do is tween the IK target from it’s default position relative to the hand controller to the position where it’s on the object.
Hey,
Yeah, LimbIK samples the pose at Start to find out which way to bend the limbs, so all you have to do is rotate the middle bone so that bone1, bone2, bone3 form an “arrow” that points towards the wanted bending direction.
Best,
Pärtel
hi Partel,
do you have some best practice startup/recommendation to sync two ore more vrik s for an local multiplayer.
best,
Sascha
Wouldn’t this solution distort the model a bit? I’m new to rigging/animation so sorry if that’s a dumb question ![]()
Hi @Partel-Lang
I am sending some newbie questions becasue I didnt found yet the answers ![]()
LE: Puppet Master + Final IK are better to use for the above ?
thank you!