Well that’s what I mean, trying to break it up cause way more typing than if it was just in one spot locally. For example just key bone rotations was:
#region Main Variables
public GameObject maya_obj;
float mayaSize;
[Range(0.3f, 0.5f)]
public float mayaSizeNew;
public GameObject root_bone;
float bodyHeight;
float bodyHeightMax = 0f;
float bodyHeightMin = -0.046f;
[Range(-0.046f, 0f)]
public float bodyHeightNew;
float bodyForward;
float bodyForwardMax = 0f;
float bodyForwardMin = -0.02f;
[Range(-0.02f, 0f)]
public float bodyForwardNew;
public GameObject hip_bone;
float hipRot_X;
[Range(-100f, 40f)]
public float hipRot_Xnew;
public GameObject chest_bone;
float chestRot_X;
[Range(-40f, 60f)]
public float chestRot_Xnew;
#endregion
Not to mention each other specific areas of the model as well:
#region Right Arm
public GameObject rightArm_bone;
Vector3 rightArmRot;
[Range(-100, 75)]
public float rightArmRotX;
[Range(-60, 60)]
public float rightArmRotY;
[Range(-160, 66)]
public float rightArmRotZ;
public GameObject rightForearm_bone;
Vector3 rightForearmRot;
[Range(0, 1)]
public float rightForearmRotX;
[Range(-80, 60)]
public float rightForearmRotY;
[Range(-150, 0)]
public float rightForearmRotZ;
public GameObject rightHand_bone;
Vector3 rightHandRot;
[Range(-80, 80)]
public float rightHandRotX;
[Range(-20, 20)] // may actually be more, depends on forearm
public float rightHandRotY;
[Range(-40, 60)]
public float rightHandRotZ;
#endregion
As the class was a model “edit”, so could be used in the Inspector during edit mode(Slider values). Still functioned within play mode, but it was more about setting angles and rotations per what movement.
But it was one of my AI projects, where the model used real determining factors, on how to think and move for itself. even so much as the feet using load bearing points, to physically move(instead of animation just “looking like” it’s moving)…
It was a nightmare, I will admit, but was fun until it burnt me out. 