Not true. Potential energy depends only on height.