It looks reasonable enough, what happening exactly? This bit:
if ( fHeight > m_pCamera->GetPosition().y )
You should change it to:
if ( fHeight + 4.0 > m_pCamera->GetPosition().y )
Since the camera should always be 4 units above the terrain (from what your code does). Otherwise it can get very close to the terrain before finally jumping up 4 units which wouldn't look as good.
Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.
It looks reasonable enough, what happening exactly? This bit:
if ( fHeight > m_pCamera->GetPosition().y )
You should change it to:
if ( fHeight + 4.0 > m_pCamera->GetPosition().y )
Since the camera should always be 4 units above the terrain (from what your code does). Otherwise it can get very close to the terrain before finally jumping up 4 units which wouldn't look as good.
thanks, it is not jumping up now, but still under the terrain