Species that have existed over millions of years have done so because they have been able to track peaks in an adaptive landscape well enough to survive and reproduce. Such optima are defined by the mean phenotypic values that maximize mean fitness, and they are predominantly functions of the environment, for example the sea temperature. The mean phenotypic values over time will thus predominantly be determined by the environment over time, and the trait history may be found in the fossil record. Here, I simulate such a tracking system, using both a basic non-plastic selection model and a univariate intercept-slope reaction norm model. I show how both linear and nonlinear mean phenotype vs. environment functions can be found also from quite sparse and short time series from the fossil record, and I discuss how this methodology can be extended to multivariate systems. The simulations include cases with a constraint on the individual trait values and with other factors than environment influencing the positions of the adaptive peak. The methodology is finally applied on a time series of mean phenotypic values in a record of bryozoan Microporella agonistes fossils spanning 2.3 million years, using the {partial}^18 O measure as proxy for sea water temperature. From as few as ten samples of mean phenotypic values found in the fossil record it was possible to identify a linear mean phenotype vs. environment function, and to predict the continuous mean phenotypic values as functions of time with prediction errors within the standard errors of the observations. Leave-one-out cross validation gave satisfactory results. It remains to verify predictions for longer time periods without known fossil data.