frustum culling on different height maps

Wonderful. I get frustum culling working beautifully on a test height map (A), but when I load in a new height map (B) which is about 4 times the size, frustum culling decides to screw up.

It seems as if regardless of where my camera is, the view frustum rotates around world coords 0,0,0 rather than the camera(?)

Any ideas? I only changed the heightmap!

Note: the code is an implementation of Mark Morley’s example:

How long did that take? 5 mins?
The answer is that I was testing if a point was in the frustum without taking the map scale into account! Duh!


Apologies. Hope this is useful to someone else!