I’m trying to make a character walk along GeoMipTerrain using a PhysicsCollisionHandler. Collisions are being registered, but the character moves along far above the visible landscape, as if the contours of the terrain were translated hundreds of units up. When I call terrain.getBounds(), as in the code below, it returns a normal center but a whopping radius. (The heightfield file is 257x257 px).
bsphere, c (128 128 32.5997), r 10861.2 (
Code that generates GeoMipTerrain
#zScale = sys.argv[zScaleIndex] zScale = 60 heightfieldFile = sys.argv[heightfieldIndex] terrain = GeoMipTerrain("test") terrain.setHeightfield(heightfieldFile) terrain.generate() root = terrain.getRoot() root.setSz(zScale) print root.getBounds()
If necessary, I have also uploaded the heightfield file. However, the same issue occurs with other heightfields.
Thanks for any information. New to Panda3D.