Stretchy IK using Aim Contraints for Use in Game Engines

Stretchy IK using Aim Contraints for Use in Game Engines

jasonwestmas
Enthusiast Enthusiast
1,831 Views
3 Replies
Message 1 of 4

Stretchy IK using Aim Contraints for Use in Game Engines

jasonwestmas
Enthusiast
Enthusiast

Hello, I’ve found some tutorials on linda and youtube for creating stretchy joints with IK via the scale attribute. Unfortuntately scaling joints does not work with Unity. I’ve seen some rigs do this using Aim contraints instead which uses positional movement instead of scaling. Then the idea is to combine this technique with softIK. I have a basic understanding of how these things are but not sure how to set them up correctly. Are there any tutorials out there that explain these concepts in a game engine compatibility context? I can't seem to find any that don't involve scaling of joints. Thanks!

0 Likes
Accepted solutions (1)
1,832 Views
3 Replies
Replies (3)
Message 2 of 4

dinofiguera
Collaborator
Collaborator
Accepted solution

The setup will work pretty much the same way you would do with the scale.
you would need a distance tool, a multiply-divide node, two plus-minus-average nodes and a condition node.

The idea is that you first calculate the distance between the first bone and your IK-controller.
Then you tell Maya that if the distance you move the controller is more than the length of the joints,

the joints will have to extend by a quantity that is the sum of their actual extension, plus the quantity of length that you add by moving  your controller (the user length minus the default length ), divided by 2 to distribute it back to both the joints.

 

I post you an example scene.

 

2018-09-28 17_51_08-Node Editor.png

Message 3 of 4

jasonwestmas
Enthusiast
Enthusiast

I think this will get me going, thanks very much!

0 Likes
Message 4 of 4

kamranmanankhan369
Explorer
Explorer

Thanks for your tutorial. Now I have set up and animated my stretchy bones but when I export them for unity it's messing up. Is there any instruction how can I export stretchy bone from Maya to unity? I would be thank full to you.

0 Likes