0 votes
asked in VRIK by (140 points)
edited by

You have a good video of what I mean here:

https://www.youtube.com/watch?v=-eFO8q-I6xI

But this is not for VR, im wondering what the best workflow for doing something like this in virtual reality would be. Basically each item I make should be able to have 1, or more places that it will snap to when picked up so the hands seem to grip the item correctly.

------

I have started work on this and have noticed that the VRIK does not have the equivalent to:

FullBodyBipedIK.solver.rightHandEffector.position = rightHandTarget.position;

--------

Found an answer you gave here

Hey,
The InteractionTarget is used by the InteractionSystem that does not support VRIK, it works with the FullBodyBipedIK only. I have just started working on an Interaction System for VRIK though, that would take care of this hand and finger placement on objects. It's not ready to be used yet though.
But the trick would be to lerp the position of the hand IK target from it's default position relative to the controller to the position of the target hand pose on the object when the interaction starts. When it's over, you can lerp the localPosition of the IK target back to it's default value. The exact same thing needs to be done with the localRotations of the finger bones. Lerp them to match the target pose and lerp them back to default or animated values when the interaction stops.

Wonder if this is done in the newer version of VRIK or if I should then dive into trying to do this myself?

-------

Followed the advice here: Here

But I am getting weird behaviour with the forearm.

-------

Thanks

1 Answer

0 votes
answered by (10.3k points)
Hey,

Sorry, really difficult to say based on just that screenshot. Is the forearm twisting weirdly, messing up the skinning?

If so, please try adding the TwistRelaxer component to the forearm. It runs after VRIK, relaxes the twist angle of the bone between it's child and parent.

Best,

Pärtel
commented by (140 points)
edited by

Can you just run me through how you would set this up? so it works? perhaps a short video or something? Iv been trying this for ages - surely there are other that need to know how to pickup object in VR as well with animations of hands.

- I duplicated the hand_R and placed it in position on the sword and then set that hand as a child of the sword, and gave it a hand pose script. I also had a hand gameobject with the normal setting of the hand which also has a handpose script. the actual hand in the root of the rig then has a handTarget script. and then I get this weird forarm behaviour
twist relaxer didnt work

- Ok setting the weight on the handtarget to something low stops the forarm stuff, now to find out how to rotate the hand correctly. all it takes the is the position of the fingers into account and their respective rotations

- I cannot get the wrist to rotate the hand into position. It will lerp the fingers and entire hand into its position but it will not rotate the wrist in order to place it correctly on the hilt.

Having issues now with the wrist going crazy, currently im trying to make the hand attach to the swords hilt and then exchange the hand as the VRIK right arm target with the sword itself. so the hand will stay on the hilt no mater what I do with the sword. as it is following the rigidbody and I dont want the hand moving once its holding the sword.

Everything seems to work well when letting go of the sword but picking it up resets the wrist to something weird and I dont know why.

here is a link to a gif I posted illustrating the problem.

https://twitter.com/pixl_dev/status/1089981064813166593

I pretty sure the problem is that I attach the sword towhere my hand is supposed to be and then the hand is in the way and therefore gets pushed aside. What I dont know is how to fix it. All I want is for the hand to stay in the animation on the hilt.

commented by (10.3k points)

Hey, just replied in the forum, check it out.

If that doesn't help, I can take a look at your project if you can send a link over via support@root-motion.com.

Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.

...