Expression error in walk cycle
Posted: Thu Nov 15, 2018 5:17 pm
Hi
When i make an automated walk cycle i get 2 expression errors on the arm (no swinging or moving of the arms at all)
------------------ On the clavicle rotation and the arm rotation i get an "Undefined value used in expression" ---------------------------
//Duik.proceduralWalk
amp = effect("Walk Cycle")(45).value;
cycleTime = effect("Walk Cycle")(105).value;
armsSoftness = effect("Walk Cycle")(46).value;
characterSoftness = effect("Walk Cycle")(22).value;
energy = effect("Walk Cycle")(110).value;
walkSpeed = effect("Walk Cycle")(27).value;
left = false;
if (walkSpeed <0) left = true;
amp = amp*5*energy/100;
if (amp > 0)
{
softness = armsSoftness + characterSoftness;
decalage = 1.5;
amorti = 0;
sin = Math.sin(cycleTime*Math.PI*2+decalage);
for(i=0;i<amorti;i++) {
sin = Math.sin(sin);
}
rot = sin*amp;
rot = rot + rot*softness/100;
if (left) -rot;
}
else 0;
-------------------------------------------------------------------
...Any on else with this problem?
Jacob
When i make an automated walk cycle i get 2 expression errors on the arm (no swinging or moving of the arms at all)
------------------ On the clavicle rotation and the arm rotation i get an "Undefined value used in expression" ---------------------------
//Duik.proceduralWalk
amp = effect("Walk Cycle")(45).value;
cycleTime = effect("Walk Cycle")(105).value;
armsSoftness = effect("Walk Cycle")(46).value;
characterSoftness = effect("Walk Cycle")(22).value;
energy = effect("Walk Cycle")(110).value;
walkSpeed = effect("Walk Cycle")(27).value;
left = false;
if (walkSpeed <0) left = true;
amp = amp*5*energy/100;
if (amp > 0)
{
softness = armsSoftness + characterSoftness;
decalage = 1.5;
amorti = 0;
sin = Math.sin(cycleTime*Math.PI*2+decalage);
for(i=0;i<amorti;i++) {
sin = Math.sin(sin);
}
rot = sin*amp;
rot = rot + rot*softness/100;
if (left) -rot;
}
else 0;
-------------------------------------------------------------------
...Any on else with this problem?
Jacob