GeoMipTerrain and FocalPoint - noob question

Hey Guys,

I just recently discovered Panda3d - and just by playing around with it, I got quite far. A lot further than with other open-source 3d engines, that’s for sure.

Here’s a problem I have (most certainly just misunderstanding something):

If I take the Code from the GeoMipTerrain Manual Page - with the extraArgs=[] correction I got from the forum and wireframe-mode, just for checking - it seems that if I move the camera (thus the focal point), the terrain doesn’t get updated. Meaning: The high resolution part of the terrain is still around the starting position of the camera (0, 0), and stays that way even if I move the camera around.

Now I believed from reading the manual that update() should take care of that; maybe I’m mistaken. But what’s the idea then? Should I manually check the position of the camera and call generate() when it has moved? I’m afraid I don’t get it.

Thanks in advance for any reply!

Whoops, sorry, adding a task like that only makes it run once because it does not return task.cont. Instead, do something like this:

def updateMyTerrain(task):
  terrain.update()
  return task.cont
taskMgr.add(updateMyTerrain, "terrain")

I’ll fix the manual page instantly.
If you specified a NodePath (like the camera) as focal point, you don’t need to do anything yourself except for calling update().

Whoa, that was quick! Thanks a lot, it works now.