Dutchie
24-06-2007 13:04:59
i made a character and a terrain, but the problem is that the character falls through the terrain.
here is the code i use to create the character and terrain:
i use the terrain.cfg from the ogre examples, with a few modifications(only shown the modifications):
i use NxOgre 0.9-27 with ogre 1.4.2 compiled under Visual C++ Express 2005 SP1
how can i solve this? i think i have put something wrong with creating the terrain, but don't know what.
here is the code i use to create the character and terrain:
Player = TFOHScene->createCharacter("PlayerChar", Vector3(25, 75, 25), "type: box, dimensions: 1 2 1");
Player->attachMesh("Cube.1m.mesh");
Player->getNode()->scale(1,2,1);
sceneMgr->setWorldGeometry("terrain.cfg");
TFOHScene->createActor("terrain", new TerrainShape("terrain.png", 3000, 100, 513), Vector3::ZERO, "static: yes");
i use the terrain.cfg from the ogre examples, with a few modifications(only shown the modifications):
# Heightmap-source specific settings
Heightmap.image=terrain.png
# If you use RAW, fill in the below too
# RAW-specific setting - size (horizontal/vertical)
#Heightmap.raw.size=513
# RAW-specific setting - bytes per pixel (1 = 8bit, 2=16bit)
#Heightmap.raw.bpp=2
# How large is a page of tiles (in vertices)? Must be (2^n)+1
PageSize=513
# How large is each tile? Must be (2^n)+1 and be smaller than PageSize
TileSize=65
# The maximum error allowed when determining which LOD to use
MaxPixelError=3
# The size of a terrain page, in world units
PageWorldX=3000
PageWorldZ=3000
# Maximum height of the terrain
MaxHeight=100
i use NxOgre 0.9-27 with ogre 1.4.2 compiled under Visual C++ Express 2005 SP1
how can i solve this? i think i have put something wrong with creating the terrain, but don't know what.