[bleeding] physic heightmap is flipped

BigB

13-06-2008 23:13:55

Hey

I finally managed to get the heightmap loading, with the correct shape.
However, the physic mesh is flipped.
I know i can simply flip the xz in a paint program, but is there a better way to do this ?

This is how i'm loading the terrain :


NxOgre::Resources::ResourceSystem::getSingleton()->addHeightfieldAs("file://ETerrain2.xhl","o_terreno");
NxOgre::Resources::Heightfield* hf = NxOgre::Resources::ResourceSystem::getSingleton()->getHeightfield("o_terreno");

NxOgre::Terrain* terrain = new NxOgre::Terrain(
hf,
NxOgre::float3(1500, 300, 1500),
sp,
"centering: xz-above, hole-material: 65535");

mTerrainCollision = NXpmScene->createActor("terreno", terrain,
Ogre::Vector3(513, -40, 513/2),
"static: yes");


Is there a way to flip the collision shape ?

thanks,
Bruno

betajaen

14-06-2008 00:03:14

It's how it is. Flip the image in your paint program. ;)

zissakos

12-07-2008 21:45:53


I finally managed to get the heightmap loading, with the correct shape.


could you please post how you did it?