Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    67
    @Partel-Lang I've been working on getting a morph3d character rigged up with final ik. I'm having trouble with the leg bending when crouched

    with no bend goal set:
    upload_2018-10-10_16-25-13.png

    With bend goals I can get them bending in the correct directions, but it messes up the mid sections
    upload_2018-10-10_16-22-57.png

    The avatar definition in unity looks fine
    upload_2018-10-10_16-27-15.png
     
  2. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Hi @Partel-Lang I hope that solution in your next update ... For when can it be approximately? Is that the Game in which it is implemented, we send it to "Qua" shortly and I would like to leave it solved before ...

    a greeting
     
  3. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    7
    Hi Pärtel!
    I'm using VRIK with Vive trackers and ManusVR gloves, and I'm trying to figure out how to make sure bodyparts do not overlap other bodyparts. When for instance the player is putting their hand on their knee, or scratching their torso, the hand and fingers shouldn't be inside the mesh of the knee or torso. This is only partly fixed by manually moving the targets / bend goals parented to the trackers.

    I'd like to do this using colliders, but I'm not quite sure where to start. I was thinking about switching the target of the limb to the touched point ont he collider with OnCollisionEnter, but this may be wrong. I then also don't know how to reliably switch back to the tracker-target once the hand is no longer touching the knee for instance.

    Is there an easier way using FinalIK? Should I be using it combined with PuppetMaster instead?

    Thanks for your product and the good support here!
     
  4. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    73
    Last edited: Oct 23, 2018
  5. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    446
    Hello,

    Im using VR-IK with VRTK, does anybody know how to use a full body avatar with VRTK?

    Thanks
     
  6. RuslanM

    RuslanM

    Joined:
    Dec 2, 2016
    Posts:
    3
    HI Partel, I'm using VRIK and vive trackers: 1 tracker - body, 2 - legs, 1 - gun. For now avatar's body turns with the turn of the head(helmet), in other words body follows the head. Is it possible so the avatar's body turns not behind the helmet, but behind the tracker attached to the player's body? Thanks in advance.
     
  7. marcin-majkowski

    marcin-majkowski

    Joined:
    Nov 22, 2014
    Posts:
    4
    Hi! i just bought Final IK and it is JUST AWESOME!! Do You have any build in functions to change avatar model at runtime??
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    Actually, if you are using no animation, you could just disable the VRIK component and call:
    Code (CSharp):
    1. ik.solver.FixTransforms();
    2. ik.solver.Update();
    from Update. Then your particles will be fine as they'll be updated after that.

    Hey,
    That solution was in the link. Anyway, about the next version, planning to publish later this month, but if you are in a hurry, please PM with your invoice number and I'll give you a direct download link.

    Hey,
    PuppetMaster could help with that perhaps, please see this video. But it's all very experimental stuff I should add.
    The video was made with this demo scene.

    Hey, congrats on finishing the game! Great work, I mean 90% of devs never reach that goal.
    And thanks for sharing!
    (your website seems to be down though)

    Hey,
    I have actually just started with a VRIK Interaction System that can be plugged in to VRTK, but it's too early in development to put it out there. You can try this demo though (requires FIK, VRTK and Oculus assets in the project), just to get an idea of how things can be set up.

    Hey,
    Funny you should ask, another user just had the same issue and shared his fix. I'll PM you...

    Hey, thanks for the purchase!

    Which IK component were you talking about? CCDIK, FABRIK, AimIK, LimbIK have a ik.solver.SetChain() function that you can use, others are more complex.
    An easier solution could be adding the IK to all models via scripts. Won't be a performance issue as the currently deactivated models will not run the IK.

    Cheers,
    Pärtel
     
  9. marcin-majkowski

    marcin-majkowski

    Joined:
    Nov 22, 2014
    Posts:
    4
    Hi! i'm using VRIK. Also what about teleportation?? Do You have anything ready for that or i need to script something?
    And one another q: how to make knees of the humanoid to be more closer to each other?? if i'm sitting with vive, legs of my avatar are very far away so legs are much parted... how to make the knees to not be that much spread from each other?? sorry about my poor english:)
    chears! :)
     
    Last edited: Oct 13, 2018
  10. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Hi @Partel-Lang !!! I've tried it But it does not solve the problem when it has the Grounder FFBIK. Apart in the turns when you're stuck to a wall, strange positions in arms for example ...

    Maybe I did not configure it well, but I copied the same datas from the example scene that you included.



    regards
     
  11. webgrapx

    webgrapx

    Joined:
    Jul 21, 2015
    Posts:
    19
    Greetings, I am presenting the problem when using its complement movement, animset pro, since the palayer is placed well above the ground and I can not solve this. Could you help me?

    Thank you,

    Jorge Zamora
    webgrapx@gmail.com Rot Motion 1.gif
     

    Attached Files:

  12. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    7
    Hi! Thanks for the reply about the PuppetMaster, will try that today.
    I have another problem at the moment, where VRIK prevents the rotation of the wrists when turned on.

    I'd like to have the wrists rotate when I rotate the Manus gloves, and I'm pretty sure this worked previously, but somehow not anymore. Can you help out?
    ezgif.com-video-to-gif.gif
    You can see the hands do not rotate when I rotate the gloves when VRIK is turned on, but they rotate when VRIK is off.
     
  13. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    To teleport, move the character root to the new position, also the IK targets. Then call ik.solver.Reset();
    Alternately you can use AddPlatformMotion, see the "VRIK (Moving Platforms)" demo about that.

    If the feet are too far parted, you can reduce "Foot Distance" in VRIK locomotion settings. If it's the knees, you can adjust "Swivel Offset" in the leg settings.

    Hey,
    In that case, extending the ground colliders past the walls a bit is the best solution I can think of.

    Hey,
    Not sure why the player is too high, it could be the capsule collider of the character controller being out of center. Reduce the height value of the capsule or increase it's center.y.

    Hey,
    If it worked before, maybe you set arm rotation weight to 1 by accident? Does it work with 0?

    Cheers,
    Pärtel
     
  14. VicFriend

    VicFriend

    Joined:
    Oct 17, 2018
    Posts:
    1
    Hey! thanks for making such a great plugin

    I have a pretty simple use case but I haven't managed to figure out a solution:

    I have an "InteractionTrigger" that triggers a character grabbing a door handle, which works great. but we want the character to have free movement, and so if he turns away or exits the interaction trigger, we want the IK event to be stopped and interrupted.

    what happens now is that he reaches for the door handle, and as I exit the trigger, he will complete the whole event. making it look pretty weird

    is there a way to force an interrupt, or to get a callback from exiting the InteractionTrigger?

    thanks!
     
  15. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Hi @Partel-Lang , Well that is not possible at this time of development as it would require a large amount of time to adjust all the game scenarios, which is finished ...

    regards
     
  16. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    446
    Hello,

    I tried your VR-IK demo with VRTK thanks.

    https://www.dropbox.com/s/q06kx2nxfp96sue/VRIKInteractionSystem.unitypackage?dl=0

    Seems to work ok, except when i replaced the floor with an uneven terrain. What if the avatar walks off a cliff, it doesnt fall, it stays hanging on to the controllers position.

    How do i get it fall off a terrain and then land on the ground like normal, then resume the IK stuff? Can you show how to do that?

    Also what if i put the avatar inside a car (parent it to the car seat) with the car moving for example.

    How can i drive the car with the IK in place, and still use the IK for tracking the hands for driving or operating the car instruments for example while its moving?

    Thanks!
     
    Last edited: Oct 18, 2018
  17. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    29
    VRIK Steam VR example scene
    When I run the example, with Steam VR in my project, the hands if the pilot character are tracked with the controllers, however, the head is not following the VR headset transform.
    By default, I'm standing outside the pilot skin. Ca anyone pls tell me how to enable the head (and attached pilot body) to be controlled by the VR headset.
     
  18. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    7
    Hi Pärtel,

    Very good point, would've been likely, but no! It does not matter at all. Changing rotation weight, position weight, nor any of the other settings under the arm section of VRIK have any influence on the rotation of the wrist. I need to turn off VRIK to have that happen again.

    When I have PM on the model as well I need to set the Master Mapping Weight to 0 and turn VRIK off entirely to allow the rotation again.

    Do you have any other ideas how I can fix this?
     
  19. naelstrof

    naelstrof

    Joined:
    Sep 12, 2017
    Posts:
    1
    The VRIK component causes legs to spin when fully extended when bend targets are supplied. Without bend targets the legs simply bend the wrong way. Is there a way to solve either problem?

    Here's a video demonstrating the legs spinning with bend targets: https://my.mixtape.moe/bthbaa.mp4
    Here's a video demonstrating the legs bending the wrong way (without bend targets): https://my.mixtape.moe/bisjim.mp4

    Finally here's a screenshot showing that the biped IK correctly determines bend directions: upload_2018-10-18_11-1-34.png
    What can I do to keep my legs from breaking with the VRIK component?
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    The way I've solved this in the "Interaction Trigger" demo is to disable user input while the interaction happens (UserControlInteractions.cs). I think it's the best way to make sure weird IK never happens due to arbitrary avatar position/rotation.
    Aside from that, you can call interactionSystem.StopAll() to stop the interactions.

    Hey,
    I'm sorry I don't think I have a better solution for you. The Grounder just takes care of vertical foot placement correction, it doesn't move the feet horizontally. Maybe you can just increase the character controller capsule radius so the character doesn't get so close to the wall? Or only increase it while the character is running or something like that.

    Hey,
    In that demo, if you need to create some kind of a character controller, you should create a new root gameobject for the avatar, then parent the avatar and the [VRTK_SDKManager] to that. Then you can move everything by moving that root. Also add a Rigidbody with rotation constrained and a Capsule Collider. As you'll still be able to move around physically, you'll need to dynamically adjust the collider center. You can do so like this:

    Code (CSharp):
    1. void FixedUpdate() {
    2. Vector3 center = transform.InverseTransformPoint(centerEyeAnchor.position);
    3. center.y = capsule.center.y;
    4. capsule.center = center;
    5. }
    So the capsule will be where your head is even if you try to step away from the character controller physically.
    You can also parent that new root to a vehicle if you need to.

    About terrain and foot placement on terrain, please see the "VRIK (Grounder)" demo.

    Hey,
    I'm in the middle of moving my office so I don't have my Vive connected at the moment and I can't check that demo at the moment. Is the "Head Target" assigned in the VRIK spine settings and is it parented to the Vive head tracker?

    Hey,
    Maybe it is about the update order of things. You could try disabling VRIK component, then making a script that calls ik.solver.Update() from a LateUpdate. Then insert that script to the Script Execution Order to a negative value, to try to update before the Manus thing.

    Hey,
    Those problems have already been fixed, I'll PM you.

    Cheers,
    Pärtel
     
  21. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Thanks for the Ideas @Partel-Lang .
    All those I have already assessed but as the project is done and the state of its development in which it is, it is not viable to increase the radio to CapsuleCollider (It would be necessary to redesign many scenarios and there is no time left)

    Just as an idea: Would it be possible for Grounder to detect when a foot crosses an obstacle, such as a wall, and when this happens, check that if the surface is less than x height? and that in this case the Grounder gives you the original height of the animation instead of taking the foot down?

    I would program it myself but I do not know what parts of its code I should touch in order to implement this idea and see if it works

    I do not know if I explained myself, my English is rather clumsy

    regards
     
  22. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    25
    Sorry but what is this maxHeadDistance variable??
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey, I think I have a solution for you after all. Please import this patch. Then you can set "Overstep Falls Down" to false in the Grounding solver.

    Hey,
    It's just a float that you can declare in the declaration space:

    Code (CSharp):
    1. public float maxHeadDistance = 1f;
    So if you have it at 1, the root will follow the head allowing max 1m of horizontal offset.

    Best,
    Pärtel
     
  24. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Hi @Partel-Lang !! Does it refer to that variable that I point out in the photo ??? Because I imported your patch but it does not seem to do anything ... The problem keeps happening the same. I do not know if I'm doing something wrong but I think I've done what he asked me (Import patch and set that variable to false in the inspector)

    Any suggestions?

    ProblemFinalIK.jpg
     
  25. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    26
    Hi,
    I have ran into another problem here, where the clevical joint on our rig rotates waaaay too much when the user raises his/her hand
    we are working FINAL IK inside of VR and the hand location in space is driven by the motion controller. I am guessing we need to limit the rotation of the clevical bone somehow , because using the Weight option is not really working as that completely removes the rotation of the joint from the IK chain.
     
  26. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    210
    Hi Partel, I'm getting a warning when trying to get BipedReferences for an UMA2 character at runtime using

    Code (csharp):
    1.  
    2. BipedReferences brefs = new BipedReferences();
    3. BipedReferences.AutoDetectReferences(ref brefs, actor.Puppet.transform.Find("Root"), BipedReferences.AutoDetectParams.Default);
    4.  
    The warning is: Biped's root Transform's position should be at ground level relative to the character (at the character's feet not at it's pelvis).

    Any ideas what I'm doing wrong?
     
  27. adhochero

    adhochero

    Joined:
    Feb 2, 2017
    Posts:
    30
    What would be the best component to use for 3DoF VR if the player is seated, in a vehicle, and i just want the head to move with the HMD while the rest of the player stays sill. so the hands would be on the steering wheel always and only the head is rotating up/down/left/right? i haven't been able to get something working right yet
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    Can you send me a repro or something? Because it should not lower the body when the foot finds no surface with that option disabled. Can't reproduce it here.

    Hey,

    That is a known issue with the current version of VRIK, the "Shoulder Rotation Weight" doesn't blend right in "Yaw Pitch" mode. It has been fixed for the next version that I submitted for review today. If you can't wait a week or so, please PM me with your invoice number.

    Hey,
    Where is the root transform of that character? Some weird characters have it at the pelvis level, which is not good for VRIK. Can you Debug.Log the actor.Puppet.transform.Find("Root") and see where it is? Perhaps you can use another root, I mean just parent the character to a new GameObject that is on the ground level relative to the character and use that.

    Hey,
    VRIK. Please check the "VRIK (Basic)" demo, it has a seated character example.

    Cheers,
    Pärtel
     
  29. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    73
    Thanks Yes Partel, it's a very hard job. You even end up with anxiety problems, in the eyes, etc ... Now I'm having a lot of criticism since I took the game to the market. Among other things, people do not like the strange movements of my characters, I have tried to integrate PM, FinalIK and Tactical AI, but I have not done well realistically. If you want I can send you a private message with a Steam download key so you can download the video game and take a look at it. I can also pass you a package with alien prefabs to see if you can help me with something. Thank you so much
     
    Last edited: Oct 23, 2018
  30. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    496
    Hi @Partel-Lang I send you a test project by private. regards
     
  31. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    210
    It's a normal UMA2 - the root is at at the foot level. Does it matter that the the spawn point is like 0,-1000,0 - would that affect it? The GameObject "Puppet" has all the UMA scripts on it, and the "Root" child is at local position 0,0,0 to that.
     
  32. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    I'm sorry, I'm extremely busy these days with multiple projects, can't make that effort at the moment. Maybe in a few weeks when things slow down hopefully.

    Not exactly sure what might be causing it then. In BipedReferences.cs (line 559) it compares the height of the head from the feet and the height of the root from the feet and if the root too high, it shoots this warning. If you play the game and the gameobject that is assigned as Root in the VRIK's References is actually on ground level, you can just ignore that warning and maybe comment it out (just make the function at line 559 always return false) if it gets too annoying.

    Best,
    Pärtel
     
    PicturesInDark likes this.
  33. saharaseeri

    saharaseeri

    Joined:
    Jul 1, 2017
    Posts:
    7
    Dear SamPav, I am working with VRIK and photon networking to synchronize the movement for each player. I was successfully synchronized all 5 trackers target over the network, but each tracker has their won prefab to represent their location in the photon could, which are cubes. My question is how to send all the 5 trackers only with one prefab that represent the avatar? could you please provide me more information and steps on that. Thanks...
     
  34. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    Each tracker doesn't need to have a PhotonView. You can have each player sync all their tracker positions and rotations by writing/reading the stream in OnPhotonSerializeView.
    It is also a more reliable way as you'll know all tracker positions/rotations of a character are synced with the same network package.

    Best,
    Pärtel
     
    saharaseeri likes this.
  35. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    17
    Hi, After I use interactionSystem.StartInteraction() to a Box, the collider stop working. My player can now walk pass through the object. What do I miss? I am sure the collider and rigidbody are still attached

    Thank you!
     
  36. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Is it the character collider that stops working or the box collider? Can you check if the collider is enabled after the interaction?
     
  37. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    17
    Yes! It's enable.
     
  38. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    17
    To be exact, the character collider that stops working. Sorry for a bit unclear.

    As far as I know
    I use Pickup on InteractionObject.
    I can also use this box to collide to another box in the scene.
    A player can also collide with another box in the scene which does not interact yet.


    I attached the GIF for the issue.
    Problem2.gif
     
    Last edited: Oct 29, 2018
  39. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    17
    Hi,

    I'm using Final IK to drag another player hand. However, it shows a weird interaction when you are trying to run. The problem is you are leaning back toward the one who you are dragging which is not natural. I set the weight for both hands around 0.75f. Is there any way to make you more dominant and not leaning back?

    Thank you.

    Problem.gif
     
    Last edited: Oct 29, 2018
  40. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    8


    I have an avatar doing a golf (putting) motion.

    The movement is achieved strictly with force from the putter + Final IK. No Animation.

    How could I limit the rotation of the arms ( you can see the arms are rotating irregularly ).

    I am using FBBIK with the hand pose script from the tutorial videos.

    Would Limb IK be the solution to achieving a natural arm movement ( no irregular rotation )?
     
  41. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    7
    Hi man,
    Thanks, you set me on the right path there. Changing the update order did the trick. I changed the WristRotation in the Manus 'Hand' script from FixedUpdate to LateUpdate, and now the wrists are working properly again!
    Thanks again.
    Best,
    Maarten
     
  42. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    86
    Hello Pärtel,

    I have a problem with VRIK.


    Both character's head target is set to the same object. However whereas pilot looks fine, the 2nd model is rotated by -65 degrees. Why 65? I have absolutely no idea. I could fix this by offsetting target rotation, but that would still cause problems with VR IK animated locomotion and God knows where else.
    There are two differences between those models (afaik). First is bone structure.
    The second one is bone rotations (model was created in Blender). But the forward direction for both models root is blue arrow and green for pelvis.

    EDIT: OK, I know where the 65 came from. It's the rotation of the head bone. Still it's a proper value.
    So its Z-forward/up war. Again. But since those are bones, I don't think they can be easily rotated. And I'm not a fan of using fbx so I could bake transforms.
    Can you maybe add custom forward vector as it is with palm/wrist?
     
    Last edited: Oct 30, 2018
  43. saharaseeri

    saharaseeri

    Joined:
    Jul 1, 2017
    Posts:
    7
    Thank you for responding! I would like to know in steps how I can sync Final IK using Vive by using photon. For example, where should I place game_objects for head, lefthand, righthand, leftfoot, and rightfoot? you mention to use OnPhotonSerialize function where should I attach the script? where should I add photon view? Also, I need to know the hierarchy of the avatar with the game_objects (head, lefthand, righthand, leftfoot, and rightfoot) that I have to have add how its look like? Thank you...
     
  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    Didn't remember this, but looking at the code, InteractionSystem calls IgnoreCollision with the character controller and the interaction object when the object is picked up. That is because if you picked up an object that collides with the character, the character would be colliding with it continuously and it would mess up your character controller physics.

    What you should do is when the is dropped, call Physics.IgnoreCollision(characterCollider, objectCollider, false);

    Did you base this off the "Holding Hands" demo in Final IK?
    In that demo, it can be adjusted simply by changing the "Cross Fade" value in the HoldingHands component on the "HandsTarget" gameobject. It basically just lerps the hand target from character1 to character2. You can also adjust FBBIK spine settings like "Pull Body Horizontal" and "Reach" in the arm settings.

    Hey,
    If you get the latest Final IK, you'll have the new ArmIK component, which would be good to use because it has also the shoulder and stuff like automatic arm stretching. In a golfing scenario, where elbow angle should be quite rigid with the angle of the club, you can add bend goal objects and parent them to the golf club. Then assign them to that arm IK and set "Bend Goal Weight" to something greater than 0.

    Hey,
    Yeah the IK targets need to match with bone orientations. The easiest to set up a head target would be to move the camera to the eyes, then duplicate the head bone and parent it to the camera and assign it as the head target.

    Hey,
    You should add the PhotonView to the root of the character, then also add a script for syncing the IK to that same gameobject. That script should extend Photon.MonoBehaviour and the IPunObservable interface:
    Code (CSharp):
    1. public class IKSync: Photon.MonoBehaviour, IPunObservable {
    Make the PhotonView observe that script. Then add this logic:
    Code (CSharp):
    1.  public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
    2.     {
    3.         if (stream.isWriting)
    4.         {
    5.             stream.SendNext (ik.solver.headTarget.position);
    6.             stream.SendNext (ik.solver.headTarget.rotation);
    7.          // Same for the hand targets
    8.    // It would be best to sync root position/rotation here too just to make sure it doesn't fall out of sync with the IK targets, which would cause a glitch for example when the character is teleported and the IK targets are left behind.
    9.         }
    10.         else
    11.         {
    12.             headIKTargetProxy.position = (Vector3)stream.ReceiveNext();
    13. headIKTargetProxy.rotation = (Quaternion)stream.ReceiveNext();
    14. }
    15. }
    On the remote instance, the IK target proxies are just empty gameobjects in the scene assigned as IK targets in VRIK.
    The hierarchical position of the proxies matters only as much as you shouldn't parent them to the root of the character. That is because if you are using VRIK's built in locomotion or some other locomotion technique that moves the root to follow the IK target, that technique should not move the IK targets along with the root. Otherwise you'd get a circular dependency like a dog chasing it's tail.

    Cheers,
    Pärtel
     
    DrInternet likes this.
  45. saharaseeri

    saharaseeri

    Joined:
    Jul 1, 2017
    Posts:
    7
    Thank you so much! I will try it and let you know how it goes. One more question:
    I am using VRIK calibrator script that comes with Final IK. I made some changes to do the calibration by pressing the trigger and everything looks perfect localy. My question: should I sync the trigger button? if yes, where should I attach the scripts of the trigger and VRIK calibrator in order apply synchronization...
     
  46. gjh_unity

    gjh_unity

    Joined:
    Oct 17, 2018
    Posts:
    1
    Hi Partel,

    I'm trying to create an animation override where IK is disabled and an animation takes control of the arms by blending from VRIK to an animation playing through Mecanim. Currently I'm blending the VRIK solver's IK Position Weight to zero as I blend the layer weight of the layer playing the animation to one. It almost works, except as the blending is taking place the joints' positions seem to detach from each other. It's most noticeable in the hands detaching from the forearm.

    If I change the Position Weight to zero on the VRIK's left/right arms so the arms go into t-pose and then blend, it doesn't detach in that case. Do you know anything I can try to fix it? Thanks!
     
    Last edited: Nov 1, 2018
  47. Oyshoboy

    Oyshoboy

    Joined:
    Jan 6, 2017
    Posts:
    4
    @Partel-Lang I have problem with Final IK, do you know why colliders are not moving by solver? In inspector it's looks like hand colliders are moved, but in fact when I shoot in place where used to be hand before - it's detect collision with it ( Elbow_R ) .
     
    Last edited: Nov 3, 2018
  48. Khai3

    Khai3

    Joined:
    Aug 13, 2018
    Posts:
    11
    Hello,

    So I recently bought FinalIK but I am a complete novice so my question is going to sound really basic. I tried to setup the VRIK to attach a character to the VR camera rigs. I followed the tutorial that was posted on youtube and tried it myself with the pilot in the provided sample scene. That worked out okay. However, when I tried with a character from my own assets, I encountered all sorts of problem
    1.PNG

    The limbs were all weird but the most pressing issue was that the camera wasnt fixed to my head.
    2.PNG

    I already set the transform of the 'wrists' and the 'head' to zero and put them as a child under the camera rigs. I tried to adjust them in-game as well but I still could not get them to work.
     
    Last edited: Nov 4, 2018
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,757
    Hey,
    If you have the latest Final IK (1.8), the Calibrator will return VRIKCalibrator.CalibrationData when you calibrate. What that data does is it stores the calibration information and allows you to calibrate the character the exact same way in another scene or calibrate a remote instance the same way it was calibrated locally. Take a look at VRIKCalibrationController.cs to how that data can be stored and used. Perhaps you can RPC that data over to the remote clients.

    Hey,
    That is a known issue that comes from the arm stretching.
    If you are not using the arm stretching feature, you could for now just dele "isArm ||" from IKSolverVR.cs line 315. I'll try to figure this out ASAP and make a patch.

    Hey,
    It is a problem about the update order of things. You are probably making the raycast before the IK has solved for that frame. Either use LateUpdate for the raycasting and assign the script that raycasts to a higher value in the Script Execution Order than the IK component you were using has or use the ik.solver.OnPostUpdate delegate for making the raycast.

    Hey,
    Thanks for the purchase!
    Something looks very strange with that character, maybe it's a skinning or a bone hierarchy issue. Could you send me that fbx to support@root-motion.com so I could take a look?

    Best,
    Pärtel
     
  50. DaveLloyd

    DaveLloyd

    Joined:
    Nov 15, 2011
    Posts:
    8
    Hi!

    I've encountered a strange problem recently with Full Body Biped IK: I have a character walking (just using an animator and a character controller) and I also have an FBBIK attached to it. If the FBBIK component is disabled or weight=0 then everything is fine but if I enable the FBBIK and set its weight=1, then the character does an odd thing and throws its left foot out periodically along the walk path. The FBBIK has effectors set, but all effector position/rotation weights and goal weights are set to 0. I would expect that FBBIK does nothing in this case, yet it clearly is having some effect as if I freeze at one of the odd points I can move the weight slider up and down and see the character's left leg swing in and out between the normal position and this glitch.

    Any idea why it's doing that glitch and what I can do to make FBBIK null potent when all weights are 0?

    Many thanks,
    Dave
    PS: FinalIK is a great piece of work!