public override void applyFap(AnimationParametersFrame ff) { if (ff.getMask(axis1Type) || ff.getMask(axis2Type) || ff.getMask(stretchType)) { faceBone.localPosition = new Vector3( position.x + direction1.x * ff.getValue(axis1Type) + direction2.x * ff.getValue(axis2Type) + stretchDirection.x * ff.getValue(stretchType), position.y + direction1.y * ff.getValue(axis1Type) + direction2.y * ff.getValue(axis2Type) + stretchDirection.y * ff.getValue(stretchType), position.z + direction1.z * ff.getValue(axis1Type) + direction2.z * ff.getValue(axis2Type) + stretchDirection.z * ff.getValue(stretchType)); } if (ff.getMask(innerType)) { float dist = ff.getValue(innerType); Quaternion q = Quaternion.AngleAxis(dist * magicNumber, rotationAxis); faceBone.localRotation = q * orientinitial; } }
public override void applyFap(AnimationParametersFrame ff) { if (ff.getMask(type) || ff.getMask(type2)) { float fapvaltouse = 0; if (ff.getMask(type)) { if (ff.getMask(type2)) { fapvaltouse = Mathf.Max(ff.getValue(type), ff.getValue(type2)); } else { fapvaltouse = ff.getValue(type); } } else { ff.getValue(type2); } faceBone.localScale = new Vector3( 1 + dir.x * fapvaltouse, 1 + dir.y * fapvaltouse, 1 + dir.z * fapvaltouse); } }
public override void applyFap(AnimationParametersFrame ff) { if (ff.getMask(pitch) || ff.getMask(yaw)) { Quaternion qx = Quaternion.AngleAxis( ff.getValue(pitch) * amplitude1, pitchAxis); Quaternion qy = Quaternion.AngleAxis( ff.getValue(yaw) * amplitude2, yawAxis); faceBone.localRotation = qy * qx * orientInitial; } }
private void add(int[] addition, AnimationParametersFrame frame, JointType joint) { if (joint.rotationX != BAPType.null_bap && frame.getMask(joint.rotationX)) { addition[0] = addition[0] + frame.getValue(joint.rotationX); } if (joint.rotationY != BAPType.null_bap && frame.getMask(joint.rotationY)) { addition[1] = addition[1] + frame.getValue(joint.rotationY); } if (joint.rotationZ != BAPType.null_bap && frame.getMask(joint.rotationZ)) { addition[2] = addition[2] + frame.getValue(joint.rotationZ); } }
public override bool needsUpdate(AnimationParametersFrame bf) { bool toReturn = false; if (bf.getMask(type1)) { lastVal1 = bf.getRadianValue(type1); toReturn = true; } if (bf.getMask(type2)) { lastVal2 = bf.getRadianValue(type2); toReturn = true; } return(toReturn); }
private void copy(AnimationParametersFrame original, AnimationParametersFrame result, BAPType bapType) { if (bapType != BAPType.null_bap) { if (original.getMask(bapType)) { result.applyValue(bapType, original.getValue(bapType)); } } }
public override void applyFap(AnimationParametersFrame ff) { if (ff.getMask(type1)) { faceBone.localPosition = new Vector3( position.x + dir.x * ff.getValue(type1), position.y + dir.y * ff.getValue(type1), position.z + dir.z * ff.getValue(type1)); } }
public override bool needsUpdate(AnimationParametersFrame bf) { bool toReturn = base.needsUpdate(bf); if (bf.getMask(type3)) { lastVal3 = bf.getRadianValue(type3); toReturn = true; } return(toReturn); }
public override bool needsUpdate(AnimationParametersFrame bf) { return(bf.getMask(type1)); }