public void UpdateLeg(RobotController robot) { Kinematic leg = robot.GetLeg(legIdx); if (leg == null) { return; } Vector3 jointsVec = new Vector3(); for (int jointID = 0; jointID < numJoints; jointID++) { jointsVec[jointID] = jointAnglesNodes[jointID].Value; } leg.SetJoints(jointsVec); }