void ReflectDecisionsToDoll(double[] unknowns, Doll doll) { int idx = 1; // idx = 0 is used by the field of view // Center position doll.SetRootLocation(new Vector3( (float)unknowns[idx++], (float)unknowns[idx++], (float)unknowns[idx++])); // Angles foreach (var part in _targetParts) { doll.SetEulerAngle(part, new EulerAngle( (float)unknowns[idx++], (float)unknowns[idx++], (float)unknowns[idx++])); } }