Home Technical Talk

Animating Dynamic Cables for Unity

Fatmandu
polycounter lvl 3
Offline / Send Message
Fatmandu polycounter lvl 3
I could really use some help. I have a project I'm working on, but I am by no means an animator. I've made due so far but my knowledge of 3DS Max to Unity animations is limited. I want the cables I'm animating to behave more realistically, but I'm having trouble getting that to translate into Unity. 

RIght now I have a setup that does 90% of what I want it to do, but I need to take it to the next level. I want to have one cable end at a fixed point in space (the hole it's coming out of) and the other end (the plug) uninstall from a socket and lift away (or even make a 360 turn so the player can look at the prongs). I currently have two bones, one in the plug at the fixed point with a smooth skin across the wire. I animate the plug moving away and, like I said, it's mostly right, but I want the cable to interact a little more realistically and have slack/gravity.

Current Setup:

What it looks Like un-installed (this is the worst looking one because of how close the cable end is):

The problem I have if I go too far:


I've tried using dynamic bones like in these tutorials:
https://www.youtube.com/watch?v=GaAjve4NZd0
http://farfarer.com/blog/2011/07/07/unity-skeletal-ragdoll-jiggle-bones-tutorial/

I think that they would work for what I need, except that I need an HI solver to move the end of the cable> Which requires that I bake the animation> Which puts keyframes on the dynamic bone> Which disables the whole dynamic setup... I don't know how to translate the end bone to the position I want without some sort of constraint or keep the cable one diameter all the way through the animation.

I'm sure someone has other ways to approach this problem and I'd love to hear them. I know there are a few good looking scripts on the Asset Store, but I need to explore any alternative before dropping the $45 - $150 on a package that might not work out. if anyone here has used on of the rope scripts, let me know!
Sign In or Register to comment.