Advertisement

NeHe's Tutorial 35, Height Map question..

Started by October 12, 2001 06:23 AM
-1 comments, last by HellRiZZer 23 years, 4 months ago
I''ve been trying to figure out the position of the camera, so it will have same height as the heightmap at given point. E.g if my camera at x=15.0, z=45.0 I want to know y value of the heightmap at that point because the height in it is on y axis. The equation
  
Camera.y=pHeightMap[x + (z * MAP_SIZE)]; // pHeightMap is RAW data

  
does work but very strangely, and it doesn''t follow the height at given point. Sometimes it does, sometimes not. Please help. I need to solve this problem.

This topic is closed to new replies.

Advertisement